Method Protocols.HTTP.http_encode_query()


Method http_encode_query

string http_encode_query(mapping(string:int|string|array(string)) variables)

Description

Encodes a query mapping to a string; this protects odd - in http perspective - characters like '&' and '#' and control characters, and packs the result together in a HTTP query string.

Example:

	> Protocols.HTTP.http_encode_query( (["anna":"eva","lilith":"blue"]) );
     Result: "lilith=blue&anna=eva"
     > Protocols.HTTP.http_encode_query( (["&":"&","'=\"":"\0\0\0\u0434"]) );
     Result: "%27%3D%22=%00%00%00%D0%B4&%26amp%3B=%26"