Skip to main content

Set response file

Sets the file path to save the query result

Function SetResponseFile(Val Value) Export

ParameterCLI optionTypeRequiredDescription
Value--filepathStringFile path

Returns: DataProcessorObject.OPI_HTTPClient - This processor object


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\\bqqbm25rc3c.tmp"