Return connection
Returns the object of the current HTTP connection
Function ReturnConnection(Forced = False) Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Forced | - | Boolean | ✖ | False > The processor object will be returned instead of the connection if there were errors in it |
Returns: DataProcessorObject.OPI_HTTPClient, HTTPConnection, Undefined - Connection or the same processor 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)
.ReturnConnection(); // <---
Result
NOT JSON: HTTPСоединение