Web.HTTPApp.HTTPDecode

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function HTTPDecode(const AStr: string): string;

C++

extern DELPHI_PACKAGE System::UnicodeString __fastcall HTTPDecode _DEPRECATED_ATTRIBUTE1("Use TNetEncoding.URL.Decode") (const System::UnicodeString AStr);

Properties

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

Description

Attention: HTTPDecode is deprecated. Please use System.NetEncoding.TURLEncoding.

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