2024-12-15 21:26:24 +03:00
|
|
|
---
|
2024-12-16 15:44:01 +03:00
|
|
|
sidebar_position: 7
|
2024-12-15 21:26:24 +03:00
|
|
|
---
|
|
|
|
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
|
|
|
|
# ProcessRequest
|
|
|
|
Sends a single request to a specified address and receives a response using the default settings
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-16 10:02:23 +03:00
|
|
|
`Function ProcessRequest(Val Address, Val Data = "", Val ResponseString = True) Export`
|
2024-12-15 21:26:24 +03:00
|
|
|
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|
|
|-|-|-|-|-|
|
|
|
|
| Address | --address | String | ✔ | Address and port |
|
|
|
|
| Data | --data | String, BinaryData | ✖ | Data or text to be sent |
|
|
|
|
| ResponseString | --string | Boolean | ✖ | An attribute of receiving the response as a string |
|
|
|
|
|
|
|
|
|
|
|
|
Returns: BinaryData, String - Response
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
:::tip
|
|
|
|
Parameters with Binary data type can also accept file paths on disk and URLs
|
|
|
|
:::
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
2024-12-16 19:38:57 +03:00
|
|
|
|
2024-12-15 21:26:24 +03:00
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
2024-12-16 15:44:01 +03:00
|
|
|
Address = "45.79.112.203:4242";
|
|
|
|
Data = "Echo this!" + Chars.LF;
|
2024-12-15 21:26:24 +03:00
|
|
|
|
2024-12-16 15:44:01 +03:00
|
|
|
Result = OPI_TCP.ProcessRequest(Address, Data);
|
2024-12-15 21:26:24 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|