Skip to main content

Return request

Returns the object of the current HTTP request

Function ReturnRequest(Forced = False) Export

ParameterCLI optionTypeRequiredDescription
Forced-BooleanFalse > The processor object will be returned instead of the request if there were errors in it

Returns: DataProcessorObject.OPI_HTTPClient, HTTPRequest, Undefined - The request or the same processing object


caution

NOCLI: this method is not available in CLI version


1C:Enterprise/OneScript code example
    URL = "https://httpbin.org";
URL = URL + "/get";

Result = OPI_HTTPRequests.NewRequest()
.Initialize()
.SetURL(URL)
.ProcessRequest("GET", False)
.ReturnRequest(); // <---
Result
NOT JSON: HTTPЗапрос