Show: Delphi C++
Display Preferences

Web.HTTPApp.HTTPEncode

From XE2 API Documentation
Jump to: navigation, search

Delphi

function HTTPEncode(const AStr: AnsiString): AnsiString;

C++

extern PACKAGE System::AnsiString __fastcall HTTPEncode(const System::AnsiString AStr);

Properties

Type Visibility Source Unit Parent
function public
Web.HTTPApp.pas
Web.HTTPApp.hpp
Web.HTTPApp Web.HTTPApp

Description

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 ('), 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.

See Also

Personal tools
Previous Versions
Translations