vendredi 2 octobre 2015

Make the Express mocks respond to JSON API Content-Type

I'm using Ember data JSON API Adapter, in development against the Mocks server provided with Express.

When I switched from RESTAdapter to JSONAPIAdapter, I could no longer access the body of the request.

Can I easily make the mocks respond to the Content-Type: application/vnd.json+api and understand the req.body as JSON?

I have gotten around this for now by adding Content-Type:application/json to my app/adapters/application.js file.

Thanks.

DEBUG: -------------------------------
DEBUG: Ember      : 1.13.7
DEBUG: Ember Data : 1.13.8
DEBUG: jQuery     : 1.11.3
DEBUG: -------------------------------




Aucun commentaire:

Enregistrer un commentaire