Web.HTTPApp.HTTPEncode
Delphi
function HTTPEncode(const AStr: string): string;
C++
extern DELPHI_PACKAGE System::UnicodeString __fastcall HTTPEncode _DEPRECATED_ATTRIBUTE1("Use TNetEncoding.URL.Encode") (const System::UnicodeString AStr);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Web.HTTPApp.pas Web.HTTPApp.hpp |
Web.HTTPApp | Web.HTTPApp |
Description
Warning: HTTPEncode is deprecated. Please use System.NetEncoding.TURLEncoding.
Converts a string into a form that contains no values that are illegal in an HTTP message header.
HTTPEncode converts all characters in the AStr parameter except for the letters A through Z (and a through z), numerals 0 through 9, the asterisk (*), dollar sign ($), exclamation point (!), at sign (@), period (.), underscore (_), single quote ('), parentheses, and hyphen (-). Spaces are converted to plus characters (+), and all other characters are converted into hex values preceded by the percent sign (%).
For example, the string
% ?
is converted into
%%+%3f
HTTPEncode returns the converted string.