There is space to grow your ideas...

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Lb_Test = true;


//dbg();
//brk();
#define EventAttributeID 712


/*******************************************************/
/* Default Answer                                                        */
/*******************************************************/
WebRequestAnswer = GetUtf8BlobFromString("SMT School Professional:\n\rWebAddress Request Error!");
WebRequestAnswer = GetWebResponsePacket([""],
  ["Server","Content-Type","Content-Length"],["SMT School Professional","text/JSON; charset=UTF-8",GetSize(WebRequestAnswer)],
  "HTTP/1.1",400,GetHttpCode(400),WebRequestAnswer);


Li_AddressID = 0;


Lo_Data = GetWebRequestData(WebRequest);


Li_Error = 0;
Li_AnswerCode = 200;
Ls_Message = "OK";
Lo_Answer := {"Error": Li_Error, "ErrorText" : Ls_Message};


/*******************************************************/


if ((Li_Error != 0) || (Li_AnswerCode != 200))
{
  Ls_Message = GetTraceText();
  Li_Pos = StrFind(Ls_Message,"Executing Program...");
  if (Li_Pos >= 0)
  {
    Ls_Message = StrMid(Ls_Message,Li_Pos+21);
    Ls_Message = StrTrim(Ls_Message,"\n");
  } /* if */
} /* if */


Lo_Answer.Error = Li_Error;
Lo_Answer.ErrorText = Ls_Message;


WebRequestAnswer = GetUtf8BlobFromString(GetJSONFromObject(Lo_Answer));
WebRequestAnswer = GetWebResponsePacket([""],
  ["Server","Content-Type","Content-Length"],["SMT School Professional","text/JSON; charset=UTF-8",GetSize(WebRequestAnswer)],
  "HTTP/1.1",Li_AnswerCode,GetHttpCode(Li_AnswerCode),WebRequestAnswer);


Skip = 0;
Result = 0;