Data.Cloud.CloudAPI.TCloudService.PrepareRequest

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function PrepareRequest(const HTTPVerb: string; Headers, QueryParameters: TStringList;  const QueryPrefix: string; var URL: string; var Content: TStream): TCloudHTTP; overload; virtual;
function PrepareRequest(const HTTPVerb: string; Headers, QueryParameters: TStringList;  const QueryPrefix: string; var URL: string): TCloudHTTP; overload; virtual;

C++

virtual TCloudHTTP* __fastcall PrepareRequest(const System::UnicodeString HTTPVerb, System::Classes::TStringList* Headers, System::Classes::TStringList* QueryParameters, const System::UnicodeString QueryPrefix, System::UnicodeString &URL, System::Classes::TStream* &Content)/* overload */;
virtual TCloudHTTP* __fastcall PrepareRequest(const System::UnicodeString HTTPVerb, System::Classes::TStringList* Headers, System::Classes::TStringList* QueryParameters, const System::UnicodeString QueryPrefix, System::UnicodeString &URL)/* overload */;

Properties

Type Visibility Source Unit Parent
function protected
Data.Cloud.CloudAPI.pas
Data.Cloud.CloudAPI.hpp
Data.Cloud.CloudAPI TCloudService

Description

Creates a new request object and populates the headers, including the authorization header.

The caller owns the lists passed in, and can free them any time after the invocation ends.

There are two PrepareRequest overloaded methods. With the first one you can provide the request content stream.

PrepareRequest returns the initialized TCloudHTTP instance.

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

Parameter Description

HTTPVerb

The HTTP verb (for example, GET, POST) of the request

Headers

The header name/value pairs to populate the request and build the StringToSign with

QueryParameters

The query parameter name/value pairs to populate the request and build the StringToSign with

QueryPrefix

The string to prefix the query parameter string with, for the StringToSign

URL

The URL of the request

Content

The request content stream or nil

See Also