[openstreetmap/openstreetmap-website] Set default format for all API routes (#2065)

mmd notifications at github.com
Wed May 8 14:51:53 UTC 2019


mmd-osm commented on this pull request.



>      )
     assert_routing(
       { :path => "/api/0.6/node/1", :method => :delete },
-      { :controller => "nodes", :action => "delete", :id => "1" }
+      { :controller => "nodes", :action => "delete", :id => "1", :format => "xml" }

PUT and DELETE related requests in this controller (as well as in the ways and relations controller) return plain text as a response (see https://github.com/openstreetmap/openstreetmap-website/blob/master/app/controllers/api/nodes_controller.rb#L54-L62).

I have some doubts if it's correct to assume format :xml in this case, and would only do so in case the response really uses XML format. Maybe I'm missing something here, though.

-- 
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/2065#pullrequestreview-235105000
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190508/a2464329/attachment.html>


More information about the rails-dev mailing list