8 Matching Annotations
  1. Oct 2015
    1. echo $res->getStatusCode();

      This did not work for me. Had an array as response, coming form service descriptor configuration. Therefore, I used the location statusCode to retrieve what was needed.

    2. $res = $client->get('/status/500', ['exceptions' => false]);

      Make sure Guzzle does not throw exceptions !!! Deal with them by yourself !!!

    1. statusCode

      use this location to retrieve message status code when you do not let Guzzle throw exceptions. Something like

      "properties": { "httpStatus": { "location": "statusCode", "type": "string" } ...

  2. Sep 2015
  3. May 2015
    1. if the client is incapable of working with HTTP headers

      OK... So in fact the wrapper I am implementing for recs ecommerce API is overkill - it is redundant with http. I'll keep it though, since I like to define my own error codes.

    2. I'm a big fan of the approach that Stripe has taken to API versioning -

      Ouch ! :/ I read somewhere else that this was in fact very bad practice...

    1. RFC 7235 - Access Authentication Framework RFC 2617 - HTTP Authentication: Basic and Digest Access Authentication

      Further readings...