1 package HTTP
::AnyUA
::Backend
::Furl
;
2 # ABSTRACT: A unified programming interface for Furl
8 our $VERSION = '0.900'; # VERSION
10 use parent
'HTTP::AnyUA::Backend';
12 use HTTP
::AnyUA
::Util
;
17 my ($method, $url, $args) = @_;
19 local $args->{content
} = HTTP
::AnyUA
::Util
::coderef_content_to_string
($args->{content
});
21 my $request = HTTP
::AnyUA
::Util
::native_to_http_request
(@_);
22 my $ua_resp = $self->ua->request($request);
24 return $self->_munge_response($ua_resp, $args->{data_callback
});
33 success
=> !!$ua_resp->is_success,
34 url
=> $ua_resp->request->uri->as_string,
35 status
=> $ua_resp->code,
36 reason
=> $ua_resp->message,
37 headers
=> HTTP
::AnyUA
::Util
::http_headers_to_native
($ua_resp->headers),
40 $resp->{protocol
} = $ua_resp->protocol if $ua_resp->protocol;
42 if ($resp->{headers
}{'x-internal-response'}) {
43 HTTP
::AnyUA
::Util
::internal_exception
($ua_resp->content, $resp);
46 $data_cb->($ua_resp->content, $resp);
49 $resp->{content
} = $ua_resp->content;
65 HTTP::AnyUA::Backend::Furl - A unified programming interface for Furl
73 This module adds support for the HTTP client L<Furl> to be used with the unified programming
74 interface provided by L<HTTP::AnyUA>.
82 L<Furl> doesn't keep a list of requests and responses along a redirect chain. As such, the C<url>
84 field in the response is always the same as the URL of the original request, and the C<redirects>
95 L<HTTP::AnyUA::Backend>
101 Please report any bugs or feature requests on the bugtracker website
102 L<https://github.com/chazmcgarvey/HTTP-AnyUA/issues>
104 When submitting a bug or request, please include a test-file or a
105 patch to an existing test-file that illustrates the bug or desired
110 Charles McGarvey <chazmcgarvey@brokenzipper.com>
112 =head1 COPYRIGHT AND LICENSE
114 This software is copyright (c) 2017 by Charles McGarvey.
116 This is free software; you can redistribute it and/or modify it under
117 the same terms as the Perl 5 programming language system itself.