![]() ![]() While responses are lazy, their destructor will always wait for headers to comeīack. (but then don't miss checking the status code yourself). If you do not call any of these 3 methods at all, the exception will still be thrownĬalling $response->getStatusCode() is enough to disable this behavior Pass false as the optional argument to every call of those methods, To opt-out from this exception and deal with 300-599 status codes on your own, Throw an appropriate exception, all of which implement the 3xx,Ĥxx or 5xx), the getHeaders(), getContent() and toArray() methods When the HTTP status code of the response is in the 300-599 range (i.e. Exceptions implementing the DecodingExceptionInterfaceĪre thrown when a content-type cannot be decoded to the expected representation.Exceptions implementing the TransportExceptionInterfaceĪre thrown when a lower level issue occurs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |