Return response filename
Returns the path to the response body file
Function ReturnResponseFilename(Val Forced = False, Val ExceptionOnError = False) Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Forced | - | Boolean | ✖ | False > The processor object will be returned instead of the response if there were errors in it |
ExceptionOnError | - | Boolean | ✖ | Causes an exception with a log if there were errors during processing |
Returns: Arbitrary - The response 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";
TFN = GetTempFileName();
Result = OPI_HTTPRequests.NewRequest()
.Initialize(URL)
.SetResponseFile(TFN) // <---
.ProcessRequest("GET")
.ReturnResponseFilename();
Result
"C:\\Users\\Administrator\\AppData\\Local\\Temp\\gussgm53bp2.tmp"