Data.Cloud.CloudAPI.TCloudService.IssuePostRequest

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: protected
Source:
Data.Cloud.CloudAPI.pas
Data.Cloud.CloudAPI.hpp
Unit: Data.Cloud.CloudAPI
Parent: TCloudService

Delphi

function IssuePostRequest(URL: string; Headers: TStringList;
QueryParameters: TStringList; const QueryPrefix: string;
ResponseInfo: TCloudResponseInfo;
Content: TStream): TCloudHTTP; overload; virtual;
function IssuePostRequest(URL: string; Headers: TStringList;
QueryParameters: TStringList; const QueryPrefix: string;
ResponseInfo: TCloudResponseInfo;
Content: TStream; out ResponseString: string): TCloudHTTP; overload; virtual;

C++

virtual TCloudHTTP* __fastcall IssuePostRequest(System::UnicodeString URL, System::Classes::TStringList* Headers, System::Classes::TStringList* QueryParameters, const System::UnicodeString QueryPrefix, TCloudResponseInfo* ResponseInfo, System::Classes::TStream* Content)/* overload */;
virtual TCloudHTTP* __fastcall IssuePostRequest(System::UnicodeString URL, System::Classes::TStringList* Headers, System::Classes::TStringList* QueryParameters, const System::UnicodeString QueryPrefix, TCloudResponseInfo* ResponseInfo, System::Classes::TStream* Content, /* out */ System::UnicodeString &ResponseString)/* overload */;

Description

Executes a POST request with the given parameters.

There are two IssuePostRequest overloaded methods. The second one returns the response body as a string, as well as the TCloudHTTP instance used in the request.

IssuePostRequest takes a stream to use as the request body.

IssuePostRequest returns the TCloudHTTP instance used to issue the request.

The following table shows the significance of the parameters for both the overloaded methods:

Parameter Description

URL

The URL to issue the request

Headers

The header name/value pairs to use in the request and authentication

QueryParameters

The query parameter name/value pairs to use in the request and authentication

QueryPrefix

The string to prefix the query string with when building the StringToSign

ResponseInfo

The TCloudResponseInfo instance to populate from the response of the request, or nil

Content

The stream to send as the request content

ResponseString

Output parameter, set to the string content returned in the response

See Also