SendRequest

This method sends a request to a HTTP server.
Syntax
METHOD SendRequest : BOOL
VAR_IN_OUT CONSTANT
sUri : STRING;
END_VAR
VAR_INPUT
fbClient : REFERENCE TO FB_IotHttpClient;
eRequestType : ETcIotHttpRequestType;
pContent : PVOID;
nContentSize : UDINT;
fbHeader : REFERENCE TO FB_IotHttpHeaderFieldMap;
END_VAR
Return value
Name | Type | Description |
---|---|---|
SendRequest | BOOL | Returns TRUE if the method call was successful. |
Inputs
Name | Type | Description |
---|---|---|
fbClient | REFERENCE TO FB_IotHttpClient | The HTTP client function block instance from which the request should be sent. |
eRequestType | ETcIotHttpRequestType | The type of HTTP command the request should have. The list can be found in the appendix. |
pContent | PVOID | Pointer to data memory from where the request payload should be read. |
nContentSize | UDINT | Size of the request payload. |
fbHeader | REFERENCE TO FB_IotHttpHeaderFieldMap | The instance of the FB_IotHttpHeaderFieldMap to edit the header of the HTTP request. |
/
Inputs/outputs
Name | Type | Description |
---|---|---|
sUri | STRING | The identifier of the resource on the host. Please note, that the sUri is appended to the host name of the IotHttpClient. |