loopback-component-jsonapi
loopback-component-jsonapi copied to clipboard
Change all tests to use JSON API Content-Type
Now that I think supertest/superagent has added support for application/vnd.api+json, (see https://github.com/visionmedia/superagent/issues/753) we should be able to modify all our tests to use Content-Type: application/vnd.api+json instead of application/json
This would be ideal if at a later stage we want to try to support switching how loopback handles input using the Content-Type header.
Note: need to verify that superagent/supertest now supports Content-Type: application/vnd.api+json
Pretty sure we still can't do this. I've added a helper that can be used instead of supertest based on the native http module for posts.