Hello Steven,

I am curious why the RequestExceptionInterface does not also include a
> getResponse method. Unless I am missing something (or likely some
> conversation elsewhere) it seems that if the request failed after
> connecting with a server that there would be a response.
>

Nope, that's not what it means. Here is an abstract from
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-18-http-client.md#error-handling
:

A Client MUST throw an instance of Psr\Http\Client\ClientExceptionInterface if
and only if it is unable to send the HTTP request at all or if the HTTP
response could not be parsed into a PSR-7 response object.

If a request cannot be sent because the request message is not a
well-formed HTTP request or is missing some critical piece of information
(such as a Host or Method), the Client MUST throw an instance of
Psr\Http\Client\RequestExceptionInterface.

So, in a nutshell, the exception means exactly that there is no response.

Cheers,
Stefano

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CAFojS1u6Ckv38-Gg--qhXkiB10xwS1fgSV_WedoktNcDbz7Vaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to