Hey Stefano, 

Thanks for the response and yes, that does make sense. Maybe I was staring 
at the screen too long yesterday...

Steven

On Friday, November 2, 2018 at 6:17:00 AM UTC-5, Stefano Torresi wrote:
>
> 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 php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/6ef53e1f-095a-4d8f-a255-177a519ab9d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to