Converts a string into a form that contains no values that are illegal in an HTTP message header.
function HTTPEncode(const AStr: String): string;
AnsiString HTTPEncode(const AnsiString AStr);
HTTPApp
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 ('), comma (,) 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.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|