GX::HTTP::Util

Module Version: 0.2000_01

NAME

GX::HTTP::Util - HTTP-related utility functions

SYNOPSIS

# Load the module
use GX::HTTP::Util qw(
quote
url_decode
url_decode_utf8
url_encode
url_encode_utf8
);

DESCRIPTION

This module provides various utility functions.

FUNCTIONS

Public Functions

quote

Quotes the given string.

$quoted_string = quote( $string );
Arguments:
  • $string ( string )
Returns:
  • $quoted_string ( string )

See RFC 2616, section 2.2.

url_decode

Decodes the given URL encoded string and returns the resulting string.

$string = url_decode( $encoded_string );
Arguments:
  • $encoded_string ( byte string )
Returns:
  • $string ( byte string )

url_decode_utf8

Decodes the given UTF-8/URL encoded string and returns the resulting character string.

$string = url_decode_utf8( $encoded_string );
Arguments:
  • $encoded_string ( byte string )
Returns:
  • $string ( string )
Exceptions:

url_encode

URL-encodes the given byte string.

$encoded_string = url_encode( $string );
Arguments:
  • $string ( byte string )
Returns:
  • $encoded_string ( byte string )
Exceptions:

url_encode_utf8

URL-encodes the given character string after encoding it as UTF-8.

$encoded_string = url_encode_utf8( $string );
Arguments:
  • $string ( string )
Returns:
  • $encoded_string ( byte string )

AUTHOR

Jörg A. Uzarek <uzarek@runlevelnull.de>

COPYRIGHT AND LICENSE

Copyright © 2009-2011 Jörg A. Uzarek.

This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.