THttpCli.Accept

From Overbyte
Revision as of 15:24, 27 January 2019 by Markus.humm (talk | contribs) (Created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Main page -> ICS components reference -> THttpCli -> Accept

Definition

Accept : String;

Description

When performing a HTTP Get request, the contents of this property is being added as accept header. The contents of this property shall be a comma separated list of Mime (Multipurpose Internet Mail Extensions) types. Mime types specify the format of contents and have the following syntax for this:

category/subtype

Where category is one of the following main categories:

  • text - all textual information falls under this, like unformated text (which would be the subtype "plain") or HTML webpages (subtype html)
  • image - all graphics formats fall under this, most prominently jpeg and png
  • audio - all audio formats fall under this, most prominently mp3
  • video - all video formats fall under this, most prominently mp4
  • application - all binary contents which does not fall into one of the other categories falls under it. A prominent subtype is "binary".

If the category is specified as * it means: all categories are allowed. This usually only makes sense if it is specified as */* which means all main categories with all subtypes are accepted by your applicaiton. If a subtype of * is specified this means: all subtypes of the specified main category.

A list of already registered media types can be found on the media types website.

How To / Examples

MyHttpCli.Accept := 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*';

The above would tell the http server that your application accepts gif images, jpeg images