Web.HTTPApp.HTTPDecode

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function HTTPDecode(const AStr: AnsiString): AnsiString;

C++

extern DELPHI_PACKAGE System::AnsiString __fastcall HTTPDecode(const System::AnsiString AStr);

Properties

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

Description

Decodes a string that includes HTTP escape characters.

HTTPDecode decodes the escape characters (+ and %) in a string that comes from an HTTP message header. Plus characters (+) are converted into spaces. Percent signs (%) indicate that the next two characters are the hex representation of a character. If a percent sign is followed by another percent sign (%%), it is converted into a single percent sign.

For example, the string

%%+%3f

is converted into

% ?

The AStr parameter is the undecoded string. The return value is the converted version of the string.

See Also

Personal tools
Translations