Skip to content

Commit

Permalink
Fix Issue #105 keep params from URI template
Browse files Browse the repository at this point in the history
`RestXmlCaller->_call_uri` may return a URI with a query
component. `URI->query_form` will replace an existing query with
whatever you pass to it.

The combination of these two facts means that the URI for
ListObjectsV2 lost its `?list-type=2`, and the response was in the
older v1 format, making pagination impossible.

There are 70 request types that have query components in their
`_api_uri`, they should all work better now.
  • Loading branch information
Gianni Ceccarelli committed Apr 3, 2017
1 parent 54a81c0 commit 0de24da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Paws/Net/RestXmlCaller.pm
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ package Paws::Net::RestXmlCaller;

my $uri = $self->_call_uri($call); #in RestXmlCaller

my $qparams = {};
my $qparams = { $uri->query_form };
foreach my $attribute ($call->meta->get_all_attributes) {
my $att_name = $attribute->name;
if ($attribute->does('Paws::API::Attribute::Trait::ParamInQuery')) {
Expand Down

0 comments on commit 0de24da

Please sign in to comment.