add responseObject getter
This commit is contained in:
parent
33753a8bdd
commit
cb3f418c70
@ -445,6 +445,17 @@ sub responseHeader {
|
||||
return $self->{_res}->header($header);
|
||||
}
|
||||
|
||||
=head3 responseObject
|
||||
|
||||
Return a L<HTTP::Response> response object
|
||||
|
||||
=cut
|
||||
|
||||
sub responseObject {
|
||||
my $self = shift;
|
||||
return $self->{_res};
|
||||
}
|
||||
|
||||
=head3 responseXpath ()
|
||||
|
||||
A convienience wrapper that returns a L<XML::LibXML> xpath context for the body content. Assumes the content is XML.
|
||||
|
@ -3,6 +3,7 @@ use warnings;
|
||||
|
||||
unshift @INC, "../lib";
|
||||
|
||||
use Scalar::Util qw/blessed/;
|
||||
use Test::More;
|
||||
|
||||
# Check testing prereqs
|
||||
@ -119,6 +120,8 @@ SKIP: {
|
||||
ok(scalar($client->responseHeaders()), 'Header names available');
|
||||
ok( $client->responseHeader('Client-Response-Num'), 'Can pull a header');
|
||||
|
||||
is( blessed($client->responseObject()), 'HTTP::Response', 'HTTP::Response available');
|
||||
|
||||
my $fn = "content_file_test";
|
||||
$client->setContentFile( $fn );
|
||||
$path = "/ok/" . time() . "/";
|
||||
|
Loading…
x
Reference in New Issue
Block a user