REST.Client.TRESTRequestParameterList.AddItem

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function AddItem: TRESTRequestParameter; overload;
function AddItem(const AName, AValue: string; AKind: TRESTRequestParameterKind;  AOptions: TRESTRequestParameterOptions = []): TRESTRequestParameter;  overload;
function AddItem(const AName, AValue: string): TRESTRequestParameter; overload;
function AddItem(const AName, AValue: string; const AKind: TRESTRequestParameterKind;  const AOptions: TRESTRequestParameterOptions; AContentType: TRESTContentType): TRESTRequestParameter;
function AddItem(const AName:string; const AValue: TBytes; const AKind: TRESTRequestParameterKind;  const AOptions: TRESTRequestParameterOptions; AContentType: TRESTContentType): TRESTRequestParameter;
function AddItem(const AName:string; const AValue: TStream; const AKind: TRESTRequestParameterKind;  const AOptions: TRESTRequestParameterOptions; AContentType: TRESTContentType): TRESTRequestParameter;

C++

TRESTRequestParameter* __fastcall AddItem(void)/* overload */;
TRESTRequestParameter* __fastcall AddItem(const System::UnicodeString AName, const System::UnicodeString AValue, Rest::Types::TRESTRequestParameterKind AKind, Rest::Types::TRESTRequestParameterOptions AOptions = Rest::Types::TRESTRequestParameterOptions() )/* overload */;
TRESTRequestParameter* __fastcall AddItem(const System::UnicodeString AName, const System::UnicodeString AValue)/* overload */;
TRESTRequestParameter* __fastcall AddItem(const System::UnicodeString AName, const System::UnicodeString AValue, const Rest::Types::TRESTRequestParameterKind AKind, const Rest::Types::TRESTRequestParameterOptions AOptions, Rest::Types::TRESTContentType AContentType)/* overload */;
TRESTRequestParameter* __fastcall AddItem(const System::UnicodeString AName, const System::DynamicArray<System::Byte> AValue, const Rest::Types::TRESTRequestParameterKind AKind, const Rest::Types::TRESTRequestParameterOptions AOptions, Rest::Types::TRESTContentType AContentType)/* overload */;
TRESTRequestParameter* __fastcall AddItem(const System::UnicodeString AName, System::Classes::TStream* const AValue, const Rest::Types::TRESTRequestParameterKind AKind, const Rest::Types::TRESTRequestParameterOptions AOptions, Rest::Types::TRESTContentType AContentType)/* overload */;

Properties

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

Description

Adds a REST request parameter to the list of parameters and returns the added parameter.

AddItem accepts different combinations of the following parameters:

  • <AName> is the name that identifies the parameter.
  • <AValue> is the value of the parameter, which you may specify as a string, as an array of bytes or as a stream.
  • <AKind> is the kind of the parameter, which is pkGETorPOST by default.
  • <AOptions> is a set of options for the parameter, which is empty by default.
  • <AContentType> is the type of content of the parameter, which is DefaultRESTContentType by default.