REST.Client.TCustomRESTRequest.AddParameter
Delphi
procedure AddParameter(const AName, AValue: string); overload;
procedure AddParameter(const AName: string; AJsonObject: TJSONObject; AFreeJson: boolean = True); overload;
procedure AddParameter(const AName: string; AJsonObject: TJSONObject; AOwnsObject: TRESTObjectOwnership {= ooREST}); 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, System::Json::TJSONObject* AJsonObject, bool AFreeJson = true)/* overload */;
void __fastcall AddParameter(const System::UnicodeString AName, System::Json::TJSONObject* AJsonObject, Rest::Types::TRESTObjectOwnership AOwnsObject)/* 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 | TCustomRESTRequest |
Description
Adds an HTTP parameter to the request. If a parameter with the same name already exists, the method overwrites the existing parameter.
This method is overloaded:
- The first overloaded method AddParameter adds a new parameter by name and value. This method specifies the following parameters:
AName--specifies the parameter name.AValue--specifies the parameter value.
- The second overloaded method AddParameter adds a JSON formatted HTTP parameter to the request. This method specifies the following parameters:
AName--specifies the parameter name.AJsonObject--specifies the parameter value to be formatted as a JSON object.AFreeJson--whenTrue, the object specified in theAJsonObjectparameter will be automatically freed.
- The third overloaded method AddParameter adds a new parameter to the request and specifies the parameter type. This method specifies the following parameters:
AName--specifies the parameter name.AValue--specifies the parameter value.AKind--specifies the parameter kind.
- The fourth overloaded method AddParameter adds a new parameter to the request and specifies the parameter kind and options. This method specifies the following parameters:
AName--specifies the parameter name.AValue--specifies the parameter value.AKind--specifies the parameter kind.AOptions--specifies the parameter options.