Unit 'httpprotocol' Package
[Overview][Constants][Types][Procedures and functions][Index] [#fcl]

HTTPEncode

Encodes strings for HTTP URL transmission.

Declaration

Source position: httpprotocol.pp line 159

function HTTPEncode(

  const AStr: string;

  aUnsafeChars: THTTPUnsafeChars;

  aSpacesAsPlus: Boolean

):string;

function HTTPEncode(

  const AStr: string

):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.

Arguments

AStr

  

The string to encode.

Description

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

See also

HTTPDecode

  

Decodes HTTP URL-encoded strings.


Documentation generated on: Dec 15 2025