curl_post_data Function
Syntax
DIM result AS P = curl_post_data(url AS C, data AS C [, headers AS C])
Arguments
- urlCharacter
Url endpoint to post data.
- dataCharacter
The information to send to the endpoint.
- headersCharacter
A comma-delimited list of headers. Headers must be specified in the following format:
headername:headervalue
For example:
apikey:123456789,content-type:application/json,cache-control:no-cache
Returns
- resultPointer
Returns an object with the following properties:
- errorLogical
A .t. or .f. value. If .t., an error occurred. If .f., no error occurred.
- headersCharacter
If no error occurs, contains the headers from the POST response. This property only exists if error is false.
- contentsCharacter
If no error occurs, contains the content from the POST response. This property only exists if error is .f..
- errorTextCharacter
If an error occurs, contains the error message. This property only exists if error is .t..
Description
POST data to a URL. Uses the Extension::CURL object internally.
See Also