-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
301 response makes it difficult to implement a feature #6993
Comments
The redirection is a bug on the server, I didn't imagine one would issue queries like that. Adding the .json at the end of an URL is more something used for debugging / exploring. Note that this URL structure works for at most 2 facets (which in this case is ok). It would probably be better to use the search API which allows for unlimited amount of facet and where you won't get those redirections. https://world.openfoodfacts.org/api/v2/search?informers_tags=monsieurtanuki&states_tags=en:to-be-completed&lc=fr (that's the new version of the search API, but you can do the same thing with the old one as well) |
@monsieurtanuki the best solution I have right now is using the States taxonomy: https://static.openfoodfacts.org/data/taxonomies/states.json |
@teolemon @stephanegigandet Actually there's a little bug I've just discovered, on the server side.
With the latest version of off-dart, we also put the language in the query. Which is a good idea, isn't it?
It works well for the first 3 queries (contributor, informer, photographer).
But for the last one ("to be completed") the server translates the URL, and that fails.
What shall we do? Should we handle that in off-dart? Is that a bad redirection code on the server side?
Originally posted by @monsieurtanuki in openfoodfacts/smooth-app#2315 (comment)
The text was updated successfully, but these errors were encountered: