REST.Types.TRESTRequestParameterKind
Delphi
TRESTRequestParameterKind = (
pkCOOKIE,
pkGETorPOST,
pkURLSEGMENT,
pkHTTPHEADER,
pkREQUESTBODY,
pkFILE,
pkQUERY
);
C++
enum DECLSPEC_DENUM TRESTRequestParameterKind : unsigned char { pkCOOKIE, pkGETorPOST, pkURLSEGMENT, pkHTTPHEADER, pkREQUESTBODY, pkFILE, pkQUERY };
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
enum | public | REST.Types.pas REST.Types.hpp |
REST.Types | REST.Types |
Description
Specifies the types of parameters that can be added to requests.
This enumeration defines the following values:
pkCOOKIE
: Puts the parameter into a cookie.pkGETorPOST
: Sends the parameter as a URL parameter (for GET requests) or as a body parameter (for POST/PUT requests).
- Sends the parameter as a URL query parameter for other methods, if ContentType is not ctAPPLICATION_X_WWW_FORM_URLENCODED or ctMULTIPART_FORM_DATA.
pkURLSEGMENT
: Uses the parameter as a value for a URL segment. The URL segment can be defined in a resource path of a request: customer/{ID}. If the URL Segment has a parameter with a name of "ID", then its value is replaced for {ID} in the example above.pkHTTPHEADER
: Puts the parameter in the request's HTTP header.pkREQUESTBODY
: Uses the parameter value as a request body. If more than one parameter of this kind exists, the request uses a multi-part body.pkFILE
: The value of this parameter is used to attach the file content to the request. If this parameter already exists, the request uses a multi-part body.pkQUERY
: Sends the Parameter explicitly as a URL parameter (for all requests), in contrast topkGETorPOST
, when parameter location depends on the request type and content type.