Get log
Gets the execution log
Function GetLog(Val AsString = False) Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
AsString | - | Boolean | ✖ | Return the log as a string |
Returns: String, Array - Execution log
caution
NOCLI: this method is not available in CLI version
1C:Enterprise/OneScript code example
URL = "https://httpbin.org";
URL = URL + "/get";
ParametersStructure = New Structure("param1,param2", "text", 10);
HTTPClient = OPI_HTTPRequests
.NewRequest()
.Initialize(URL)
.SetURLParams(ParametersStructure)
.ProcessRequest("GET");
Response = HTTPClient.ReturnResponseAsJSONObject();
Log = HTTPClient.GetLog(True);
Result
"Initialize: setting of default values\nSetDefaultSettings: configuration setting\nSetURL: setting the value\nSplitURL: splitting a request into component parts\nSplitURL: Secure = True\nSplitURL: Address = /get\nSplitURL: Domain = httpbin.org\nSplitURL: Port = 443\nSplitURL: Host = https://httpbin.org\nSetURLParams: parameter setting\nProcessRequest: creation of HTTPRequest object\nFormRequest: Adding parameters\nRequestParametersToString: Retrieve collection KeyValue\nRequestParametersToString: Adding parameters\nFormRequest: Creating a request object\nFormRequest: Creating a connection object\nProcessRequest: place the body in the HTTPRequest object\nCompleteHeaders: Content-Length setting\nCompleteHeaders: setting the gzip header"