2 # ABSTRACT: A backend for testing HTTP::AnyUA
7 use parent
'HTTP::AnyUA::Backend';
12 $response = $backend->response;
13 $response = $backend->response($response);
15 Get
and set the response hashref
or L
<Future
> that this backend will always respond with
.
19 sub response
{ @_ == 2 ? $_[0]->{response
} = pop : $_[0]->{response
} }
23 @requests = $backend->requests;
25 Get the requests the backend
has handled so far
.
29 sub requests
{ @{$_[0]->{requests
} || []} }
34 push @{$self->{requests
} ||= []}, [@_];
36 return $self->response || {
39 reason
=> 'Internal Exception',
40 content
=> "No response mocked.\n",