procedure ExtractHTTPFields(Separators, _WhiteSpace: TSysCharSet; Content: PChar; Strings: TStrings; StripQuotes: Boolean = False); procedure ExtractHTTPFields(Separators, _WhiteSpace: TSysCharSet; const Content: AnsiString; Strings: TStrings; StripQuotes: Boolean = False);
extern DELPHI_PACKAGE void __fastcall ExtractHTTPFields(const System::Sysutils::TSysCharSet &Separators, const System::Sysutils::TSysCharSet &_WhiteSpace, System::WideChar * Content, System::Classes::TStrings* Strings, bool StripQuotes = false)/* overload */;
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.