balanced / balanced-api

Balanced API specification.
221 stars 72 forks source link

Accept header gets no respect #505

Open mjallday opened 10 years ago

mjallday commented 10 years ago

curl https://api.balancedpayments.com/api_keys -H "Accept-Type: application/vnd.api+json;revision=1.idon't exist" -u ak-test-2cewhMxTX7Z15770T8d99xl1UJg0eGy9y:

{
  "meta": {
    "last": "/api_keys?limit=10&offset=0",
    "next": null,
    "href": "/api_keys?limit=10&offset=0",
    "limit": 10,
    "offset": 0,
    "previous": null,
    "total": 1,
    "first": "/api_keys?limit=10&offset=0"
  },
  "links": {},
  "api_keys": [
    {
      "links": {},
      "created_at": "2014-02-04T01:25:52.431334Z",
      "secret": "ak-test-2cewhMxTX7Z15770T8d99xl1UJg0eGy9y",
      "href": "/api_keys/AK2eof1pBiOE3cMFFsbWxMtE",
      "meta": {},
      "id": "AK2eof1pBiOE3cMFFsbWxMtE"
    }
  ]
}

I was expecting it to complain that the revision was not correct.

steveklabnik commented 10 years ago

This is technically a right thing to do, but you're right, it's kinda surprising.

jkwade commented 10 years ago

3ed89a54589eb53ea2e6f6f534ffaaceeebeb854ec2de9abc7d1d48e52fc63ed