[openstreetmap/openstreetmap-website] JSON output nodes, ways, relations, map (#2485)

mmd notifications at github.com
Wed Jan 22 15:31:58 UTC 2020


mmd-osm commented on this pull request.



> @@ -3,6 +3,52 @@ class ApiController < ApplicationController
 
   private
 
+  ##
+  # Set default request format to xml unless a client requests a specific format,
+  # which can be done via (a) URL suffix and/or (b) HTTP Accept header, where
+  # the URL suffix always takes precedence over the Accept header.
+  def set_default_request_format

Wait, I really wanted to add a test case with "`http_accept_format("image/jpeg")`", which behaves in the way like text/json (which is not a valid format). Will to that. The expected outcome would still be HTTP 500 (instead of HTTP 406), and not returning XML.

-- 
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_r369630461
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200122/8b488b8f/attachment.htm>


More information about the rails-dev mailing list