Sign in Join
FPDoc Onlineexperiment

HTTPEncode function

In unit HTTPProtocol

Encodes strings for HTTP URL transmission.

Declaration

pascal
function HTTPEncode(const AStr: string; aUnsafeChars: THTTPUnsafeChars; 
 aSpacesAsPlus: Boolean): string

Arguments

AStr

The string to encode.

aUnsafeChars

Additional characters to treat as unsafe.

aSpacesAsPlus

Whether to encode spaces as plus signs.

Function result

The URL-encoded string.

Description

Converts unsafe characters to percent-encoded format (%XX). The overloaded version allows specifying custom unsafe characters and space handling behavior.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.