[openstreetmap/openstreetmap-website] Allow `user/preferences/[KEY]` to accept arbitrary keys (PR #3787)

Taylor Smock notifications at github.com
Thu Nov 10 19:30:53 UTC 2022


OK. The `GET /user/preferences/key` endpoint can now return XML/JSON responses, _if and only if_ the consumer indicates that they will take the XML/JSON response in the `Accept` request header, otherwise it will return a plain text response.

There might be a better way to detect/change the request format, but the ways I tried didn't work out (`:defaults => { :format => "txt" }` completely overrode the `Accept` header).

So I _think_ I've addressed @gravitystorm's problems by getting the endpoint to return XML/JSON responses, unless the `.fmt` support is a hard requirement.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3787#issuecomment-1310797576
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3787/c1310797576 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20221110/4025c26f/attachment-0001.htm>


More information about the rails-dev mailing list