Send part
Sends a request with the specified part of the body and the Content-Range header
- Parameters
- Advanced call ?
Function SendPart(Val StartPosition, Val ByteCount, Val Method = "PUT") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| StartPosition | - | Number | ✔ | Start position in request body |
| ByteCount | - | Number | ✔ | Number of bytes from the specified start position for sending |
| Method | - | String | ✖ | Request HTTP method |
Returns
DataProcessorObject.OPI_HTTPClient - This processor object
This method has no additional advanced call parameters.
Caution
NOCLI: this method is not available in CLI version
1C:Enterprise/OneScript code example
URL = "https://bin.openintegrations.dev";
URL = URL + "/put";
ChunkSize = 524288;
Data = GetBinaryDataFromString("Some data for sending");
// Sending only "data for"
StartPosition = 5;
Bytes = 8;
Result = OPI_HTTPRequests.NewRequest()
.Initialize(URL)
.SetBinaryBody(Data)
.SendPart(StartPosition, Bytes) // <---
.ReturnResponseAsJSONObject();
Result
{
"args": {},
"data": "data for",
"files": {},
"form": {},
"headers": {
"Accept": "*/*",
"Accept-Charset": "utf-8",
"Accept-Encoding": "gzip",
"Connection": "Keep-Alive",
"Content-Length": "8",
"Content-Range": "bytes 5-12/21",
"Content-Type": "application/octet-stream",
"Host": "bin.openintegrations.dev",
"Max-Forwards": "10",
"User-Agent": "1Script v$2.0.1.0",
"X-Arr-Log-Id": "84703aff-d97a-41d1-9436-62f2315825e0",
"X-Arr-Ssl": "2048|256|C=BE, O=GlobalSign nv-sa, CN=GlobalSign GCC R6 AlphaSSL CA 2025|CN=*.openintegrations.dev",
"X-Forwarded-Host": "bin.openintegrations.dev",
"X-Original-Url": "***"
},
"json": null,
"origin": "***",
"url": "https://bin.openintegrations.dev/put"
}