Skip to main content

Use Gzip compression

Enables or disables the header for receiving data from the server in compressed form

Function UseGzipCompression(Val Flag) Export

ParameterCLI optionTypeRequiredDescription
Flag-BooleanFlag for gzip using

Returns: DataProcessorObject.OPI_HTTPClient - This processor object


tip

By default, the response from the server is requested with gzip compression

caution

NOCLI: this method is not available in CLI version


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

Image = "https://api.athenaeum.digital/test_data/picture.jpg"; // URL, Path or Binary Data

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