REST.Client.TRESTRequestParameter.ContentTypeStr

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property ContentTypeStr: TRESTContentType read FContentTypeStr write SetContentTypeStr stored ContentTypeStrIsStored;

C++

__property Rest::Types::TRESTContentType ContentTypeStr = {read=FContentTypeStr, write=SetContentTypeStr, stored=ContentTypeStrIsStored};

Properties

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

Description

ContentTypeStr is a property used for PUT or POST requests.

When ContentTypeStr is set to a specific value the value is used as the content type for PUT or POST requests.

When using ContentTypeStr consider the following tips:

  • UTF-8 encoding is applied unless doNotEncode is specified in Options.
  • When ContentTypeStr is empty, the content type depends on the number of existing parameters, that go into the requests body. The single parameter uses application/x-www-form-urlencoded, multiple parameters multipart/mixed instead.
  • This property is only relevant for PUT and POST requests. GET and DELETE requests do not have a content type.

See Also