# Net::Twitter::Role::WrapResult - perldoc - [phpMan]

## NAME
    [Net::Twitter::Role::WrapResult](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter%3A%3ARole%3A%3AWrapResult/markdown) - Wrap Twitter API response and HTTP Response

## VERSION
    version 4.01043

## SYNOPSIS
        use [Net::Twitter](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter/markdown);

        my $nt = [Net::Twitter](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter/markdown)->new(
            traits => [ qw/[API::RESTv1_1](https://www.chedong.com/phpMan.php/perldoc/API%3A%3ARESTv11/markdown) WrapResult/ ],
            %other_new_options,
        );

        my $r = $nt->verify_credentials;

        my $http_response        = $r->http_response;
        my $twitter_result       = $r->result;
        my $rate_limit_remaining = $r->rate_limit_remaining;

## DESCRIPTION
    Normally, [Net::Twitter](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter/markdown) API methods return the decoded JSON body from the HTTP response. Some
    useful information, notably rate limit information, is included in HTTP response headers. With
    this role applied, API methods will return a [Net::Twitter::WrappedResult](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter%3A%3AWrappedResult/markdown) object that includes
    both the HTTP response and the decoded JSON response body. See [Net::Twitter::WrappedResult](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ATwitter%3A%3AWrappedResult/markdown) for
    details.

## AUTHOR
    Marc Mims <<marc@questright.com>>

## COPYRIGHT
    Copyright (c) 2016 Marc Mims

## LICENSE
    This library is free software and may be distributed under the same terms as perl itself.

