-
If you use wrong credentials you get a 302 status code and get redirected to biigle login. This makes sense for the website, but shouldn't the rest api return a 401 unauthorized? This makes handling of errors more complicated as endpoints might also return a 302 as a correct response (for example the get file endpoint). |
Beta Was this translation helpful? Give feedback.
Answered by
mzur
Aug 24, 2023
Replies: 2 comments
-
You get the "scriptable" status codes if you set the header |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mzur
-
Thanks that worked. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You get the "scriptable" status codes if you set the header
Accept: application/json
. You get this with the API wrapper script. Otherwise, the API returns responses meant for the browser (as it uses the same API).