datx
datx copied to clipboard
Handle response content type
Relevant version
- [ ] 0.x
- [ ] 1.x
- [X] 2.x
Relevant libraries
- [ ] utils
- [ ] core
- [X] network
- [X] jsonapi
- [X] jsonapi-angular
Breaking change
No
Description
Sometimes, the server doesn't implement the response as expected, so we should hand e this.
We should add a browserParsingMethod
property into the network config:
-
all
- the current implementation, default in order to not break backwards compatibility -
json
- parse onlyapplication/vnd.api+json
andapplication/json
responses, ignore the rest -
strict
- parse onlyapplication/vnd.api+json
responses, ignore the rest