REST.Client.TRESTRequestParameter.ContentType

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property ContentType: TRESTContentType read FContentType write SetContentType default TRESTContentType.ctNone;

C++

__property Rest::Types::TRESTContentType ContentType = {read=FContentType, write=SetContentType, default=0};

Properties

Type Visibility Source Unit Parent
property published
REST.Client.pas
REST.Client.hpp
REST.Client TRESTRequestParameter

Description

Specifies the content-type for the corresponding PUT or POST request. This property is only applied to PUT or POST request.

This property is a value of the TRESTContentType type.
When specified, this will be used as actual content-type for the corresponding PUT or POST request - in this case the developer is responsible for applying any necessary encoding, as no standard encoding will be applied. In this case, the poDoNotEncode option has no meaning.
When this parameter is left empty, the content type will be chosen basically depending on the number of existing parameters, that go into the requests body.
A single-parameter request uses application/x-www-form-urlencoded, while a multiple-parameter request uses multipart/mixed instead.