David Golden > HTTP-Tiny-UA-0.003 > HTTP::Tiny::UA::Response

Download:
HTTP-Tiny-UA-0.003.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.003   Source  

NAME ^

HTTP::Tiny::UA::Response - Wrap HTTP::Tiny response as objects with accessors

VERSION ^

version 0.003

SYNOPSIS ^

    my $res = HTTP::Tiny->new->get( $url );

    if ( $res->success ) {
        say "Got " . $res->header("Content-Length") . " bytes";
    }

DESCRIPTION ^

This module wraps an HTTP::Tiny response as an object to provide some accessors and convenience methods.

ATTRIBUTES ^

success

url

protocol

status

reason

content

headers

METHODS ^

header

    $response->header( "Content-Length" );

Return a header out of the headers hash. The field is case-insensitive. If the header was repeated, the value returned will be an array reference. Otherwise it will be a scalar value.

AUTHOR ^

David Golden <dagolden@cpan.org>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2013 by David Golden.

This is free software, licensed under:

  The Apache License, Version 2.0, January 2004
syntax highlighting: