It would probably be nice to add a default header: Accept: 'application/json, text/json' so that you will almost always get JSON back.
It would probably be nice to add a default header:
Accept: 'application/json, text/json'
so that you will almost always get JSON back.