Core Function HTTPMakeQuery

From Sputnik Wiki
Revision as of 14:23, 12 December 2014 by UberFoX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
HTTPMakeQuery( <array> )

Contents

Description

Converts an array into a properly formatted HTTP query string for use with requests etc.

Parameters

array

The array to be converted into the query string.

Return Value

Success: Returns a properly formatted HTTP query string you can use safely.

Failure: Return null.

Remarks

None.

Example

// Make an array to be converted to a query string
my $queryArray = array("Cat" => "Meow", "Dog" => "Woof", "Testy" => "Test&Hello");
// Convert it
my $query = HTTPMakeQuery($queryArray);
// Print the result
say $query;
// Prints:
// Cat=Meow&Dog=Woof&Testy=Test%26Hello
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox