GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTTP::AnyUA::Util(3) User Contributed Perl Documentation HTTP::AnyUA::Util(3)

HTTP::AnyUA::Util - Utility subroutines for HTTP::AnyUA backends and middleware

version 0.904

    $content = coderef_content_to_string(\&code);
    $content = coderef_content_to_string($content);     # noop

Convert a coderef into a string of content by iteratively calling the coderef and concatenating the chunks it provides until the coderef returns undef or an empty string.

    $http_request = native_to_http_request($method, $url);
    $http_request = native_to_http_request($method, $url, \%options);

Convert a "native" request tuple to an HTTP::Request object.

    $headers = http_headers_to_native($http_headers);

Convert an HTTP::Headers object to a "native" hashref.

    $normalized_headers = normalize_headers(\%headers);

Normalize headers. Currently lowercases header keys.

    $response = internal_exception($content);
    $response = internal_exception($content, $response);

Create an internal exception response. If an existing response is passed, that response will have its fields modified to become an internal exception.

    ($scheme, $host, $port, $path_query, $auth) = split_url($url);

Split a URL into its components.

    $http_date = http_date($epoch_time);

Convert an epoch time into a date format suitable for HTTP.

    $epoch_time = parse_http_date($http_date);

Convert an HTTP date into an epoch time. Returns undef if the date cannot be parsed.

    $escaped = uri_escape($unescaped);

Escape a string for use in a URL query param or as "application/x-www-form-urlencoded" data.

    $bytes = www_form_urlencode(\%form_data);
    $bytes = www_form_urlencode(\@form_data);

Encode a hashref or arrayref as "application/x-www-form-urlencoded" data.

Please report any bugs or feature requests on the bugtracker website <https://github.com/chazmcgarvey/HTTP-AnyUA/issues>

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

Charles McGarvey <chazmcgarvey@brokenzipper.com>

This software is copyright (c) 2019 by Charles McGarvey.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2019-03-17 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.