You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
according to spec there must not be any body, when the server replies with HTTP 204. And in fact, chrome cancels a request, when there is data. This breaks the handling of restangular in this case:
ERROR Error: Response for getList SHOULD be an array and not an object or something else
Unfortunately, I can't find any strict definitions about rest pattern. From my understanding, collection endpoint shouldn't return 204 status. If there are no entities to return response should be an empty array. 204 status is used only for entities deletion. Will be great if you can share any docs or articles about 204 status response from collection endpoint
Hey,
according to spec there must not be any body, when the server replies with HTTP 204. And in fact, chrome cancels a request, when there is data. This breaks the handling of restangular in this case:
ERROR Error: Response for getList SHOULD be an array and not an object or something else
This can be verified like this with he help of https://httpstat.us:
Back then in 2014 there was a small fix for handling of 204: mgonto/restangular@6565c86
No idea if this ever worked, but int he current version data is of type Object, whenever the server sends no body and the check in the patch fails.
So my question before any pull request and whatsoever:
This works properly for me:
Here some facts about my system, although I don't think they make any difference:
Linux (Debian 9)
Version 70.0.3538.110 (Developer Build) built on Debian 9.6, running on Debian 9.6 (64-bit)
The text was updated successfully, but these errors were encountered: