mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-03-27 21:48:56 +02:00
64 lines
1.4 KiB
Plaintext
Vendored
64 lines
1.4 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 7
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Process request
|
|
Sends a single request to a specified address and receives a response using the default settings
|
|
|
|
|
|
|
|
`Function ProcessRequest(Val Address, Val Data = "", Val ResponseString = True) Export`
|
|
|
|
| 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/>
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Address = "45.79.112.203:4242";
|
|
Data = "Echo this!" + Chars.LF;
|
|
|
|
Result = OPI_TCP.ProcessRequest(Address, Data);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint tcp ProcessRequest \
|
|
--address "45.79.112.203:4242" \
|
|
--data "Echo this!\n"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint tcp ProcessRequest ^
|
|
--address "45.79.112.203:4242" ^
|
|
--data "Echo this!\n"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
"Echo this!\n"
|
|
```
|