datx icon indicating copy to clipboard operation
datx copied to clipboard

Handle response content type

Open DarkoKukovec opened this issue 1 year ago • 0 comments

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 only application/vnd.api+json and application/json responses, ignore the rest
  • strict - parse only application/vnd.api+json responses, ignore the rest

DarkoKukovec avatar Nov 28 '23 10:11 DarkoKukovec