Hi,
Just found this library today and I'm having an issue connected this to a JSONAPI server (fortune JS using mongo adapter).
The problem is when I make a request from devour I get this error back from the server:
NotAcceptableError: The serializer for "application/vnd.api+json" does not exist.
Apparently this is caused by the request not having a content type header. I can indeed see that chrome is not sending that header when making the request (doing a find with a single ID).
I looked inside the devour lib and can see you do set them, but then noticed this is an issue with axios the dep you are using for formatting and sending requests.
Apparently axios only applies this header if there is any content set beforehand. So I think the library needs tweaking to set the content type header after setting the data (in theory?).
Hi, Just found this library today and I'm having an issue connected this to a JSONAPI server (fortune JS using mongo adapter).
The problem is when I make a request from devour I get this error back from the server: NotAcceptableError: The serializer for "application/vnd.api+json" does not exist.
Apparently this is caused by the request not having a content type header. I can indeed see that chrome is not sending that header when making the request (doing a find with a single ID).
I looked inside the devour lib and can see you do set them, but then noticed this is an issue with axios the dep you are using for formatting and sending requests.
Apparently axios only applies this header if there is any content set beforehand. So I think the library needs tweaking to set the content type header after setting the data (in theory?).