Reputation: 3469
I'm trying to make a post request like this example:
$response = $guzzle->post('http://www.website.com/abc.asp?2014:62/9/931/99999', [
'body' => [ 'f' => 'json' ]
]);
But when i run that code i get an 505 error because the url was literally encoded after ?
.
Upvotes: 2
Views: 442
Reputation: 366
You should disable query string encoding. Try this example:
$request = $guzzle->createRequest(
'POST',
'http://www.website.com/abc.asp?2014:62/9/931/99999', [
'body' => [ 'f' => 'json' ]
]);
$request->getQuery()->setEncodingType(false); // magic line :-)
$response = $guzzle->send($request);
Upvotes: 1