REST.Client.TCustomRESTRequest.DoPrepareRequestBody

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DoPrepareRequestBody(AParamList: TRESTRequestParameterArray;
AContentType: TRESTContentType; var ABodyStream: TStream; var ABodyStreamOwner: Boolean); virtual;

C++

virtual void __fastcall DoPrepareRequestBody(System::DynamicArray<TRESTRequestParameter*> AParamList, Rest::Types::TRESTContentType AContentType, System::Classes::TStream* &ABodyStream, bool &ABodyStreamOwner);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
REST.Client.pas
REST.Client.hpp
REST.Client TCustomRESTRequest

Description

It fills ABodyStream with a stream that contains the specified list of parameters.

Depending on the type of content of the specified list of parameters, the resulting stream may be either a list of key-value pairs or an HTTP Multi-Part structure.

The caller of DoPrepareRequestBody is responsible for destroying ABodyStream.

Consider the following parameters for this option:

  • AParamList: is a list where the requested body parameters are taken from.
  • AContentType: is the content type for the body.
  • ABodyStream: points to a newly created stream, containing the body.
  • ABodyStreamOwner: When True, the caller is responsible for destroying ABodyStream. When False, the REST library owns the ABodyStream.

See Also