REST.Client.TCustomRESTClient.AddParameter

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure AddParameter(const AName, AValue: string); overload;
procedure AddParameter(const AName, AValue: string; const AKind: TRESTRequestParameterKind); overload;
procedure AddParameter(const AName, AValue: string; const AKind: TRESTRequestParameterKind;  const AOptions: TRESTRequestParameterOptions); overload;

C++

void __fastcall AddParameter(const System::UnicodeString AName, const System::UnicodeString AValue)/* overload */;
void __fastcall AddParameter(const System::UnicodeString AName, const System::UnicodeString AValue, const Rest::Types::TRESTRequestParameterKind AKind)/* overload */;
void __fastcall AddParameter(const System::UnicodeString AName, const System::UnicodeString AValue, const Rest::Types::TRESTRequestParameterKind AKind, const Rest::Types::TRESTRequestParameterOptions AOptions)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
REST.Client.pas
REST.Client.hpp
REST.Client TCustomRESTClient

Description

Adds a parameter to the request. If a parameter of the same name already exists, then the previous parameter will be removed and freed.

There are five kinds of parameters:

  • GetOrPost: Either a QueryString value or encoded form value based on method.
  • HttpHeader: Adds the name/value pair to the HTTP request's Headers collection.
  • UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId}.
  • Cookie: Adds the name/value pair to the HTTP request's Cookies collection.
  • RequestBody: Used by AddBody() (not recommended to use directly)