Web.HTTPApp.ExtractHTTPFields
Delphi
procedure ExtractHTTPFields(Separators, _WhiteSpace: TExtractCharSet; Content: PChar; Strings: TStrings; StripQuotes: Boolean = False);
procedure ExtractHTTPFields(Separators, _WhiteSpace: TExtractCharSet; const Content: string; Strings: TStrings; StripQuotes: Boolean = False);
C++
extern DELPHI_PACKAGE void __fastcall ExtractHTTPFields(const TExtractCharSet &Separators, const TExtractCharSet &_WhiteSpace, System::WideChar * Content, System::Classes::TStrings* Strings, bool StripQuotes = false)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Web.HTTPApp.pas Web.HTTPApp.hpp |
Web.HTTPApp | Web.HTTPApp |
Description
Parses a multi-valued string into its constituent fields.
ExtractHTTPFields is a general utility to parse multi-valued HTTP header strings into separate substrings.
Separators is a set of characters that are used to separate individual values within the multi-valued string.
WhiteSpace is a set of characters that are to be ignored when parsing the string.
Content is the multi-valued string to be parsed.
Strings is the TStrings object that receives the individual values that are parsed from Content.
StripQuotes determines whether the surrounding quotes are removed from the resulting items. When StripQuotes is true, surrounding quotes are removed before substrings are added to Strings.
Note: Characters contained in Separators or WhiteSpace are treated as part of a value substring if the substring is surrounded by single or double quote marks. HTTP escape characters are converted using the HTTPDecode function.