Skip to main content

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

ParameterCLI optionTypeRequiredDescription
Address--addressStringAddress and port
Data--dataString, BinaryDataData or text to be sent
ResponseString--stringBooleanAn attribute of receiving the response as a string

Returns: BinaryData, String - Response


tip

Parameters with Binary data type can also accept file paths on disk and URLs


1C:Enterprise/OneScript code example
    Address = "45.79.112.203:4242";
Data = "Echo this!" + Chars.LF;

Result = OPI_TCP.ProcessRequest(Address, Data);
    oint tcp ProcessRequest \
--address "45.79.112.203:4242" \
--data "Echo this!\n"
Result
"Echo this!\n"