Forum Discussion
Hi PerBonomi
If you open that URL in the browser, you are in fact issuing a GET request, whereas your Javascript code is issuing a POST request. I am not sure why you get a different message (something you will want to report to our Support department for investigation) however that's the only difference I can tell between the two examples you provided (assuming you tried both with the same logged in user etc...).
Please also note that jQuery's definition of "success" is not necessarily not be the same as the Lithium one. The call is successfull from jQuery's perspective (it was issued and it returned an HTTP 200 code), but Lithium may have reurned data which indicates an error within our platform. I think REST v1 returns HTTP 200 most of the time (whereas REST v2 is in line with the HTTP semantics)
Finally , these calls are being deprecated in the latest versions of jQuery so you may be better off using done, fail and always.
Thanks,
Related Content
- 6 years ago
- 8 years ago
- 9 months ago
- 4 years ago