I want to check the xml based responses from server, here is an example of the response format.
<response>
<code>success</code>
</response>
My existing code,
use GuzzleHttp\Client;
$client = new Client();
$response = $client->post('http://ift.tt/1NUF4lf', [
'form_params' => [
'transID' => 1234,
'orderID' => 6789,
'token' => '0X45FJH79GD3332'
]
]);
$xml = $response->xml();
dd($xml);
However, when I make request to the server error occurs like below.
Call to undefined method GuzzleHttp\Psr7\Response::xml()
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1KkEKNX
via IFTTT
Aucun commentaire:
Enregistrer un commentaire