[openstreetmap/openstreetmap-website] JSON output nodes, ways, relations, map (#2485)
mmd
notifications at github.com
Wed Jan 22 16:48:10 UTC 2020
mmd-osm commented on this pull request.
> + if mime.symbol == :xml
+ request.format = "xml"
+ break
+ end
+
+ if mime.symbol == :json
+ request.format = "json"
+ break
+ end
+
+ # Any format, not explicitly requesting XML or JSON -> assume XML as default
+ if mime == "*/*"
+ request.format = "xml"
+ break
+ end
+ end
That's how the future behaviour looks like vs. what we have on osm.org/master.apis:
`curl -v 'https://master.apis.dev.openstreetmap.org/api/0.6/map?bbox=-61.083984375,45.5371366803986,-61.07849121093749,45.540984218050774' -H "Accept: text/plain`
Returns: HTTP 406 (also for www.openstreetmap.org).
`curl -v 'http://localhost:3000/api/0.6/map?bbox=-61.083984375,45.5371366803986,-61.07849121093749,45.540984218050774' -H "Accept: text/plain"`
500 Internal Server Error - ActionController::UnknownFormat: ActionController::UnknownFormat
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2485#discussion_r369677097
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200122/e174c1df/attachment.htm>
More information about the rails-dev
mailing list