CopyAndPaste

random programming notes

Ruby on Rails Respond_to and HTTP Accept Header

Rails has an API respond_to for determine the response body format. According to api.rubyonrails.org, “(Rails determines the desired response format from the HTTP Accept header submitted by the client.)”

However, browsers seem to have different strategy on writing the HTTP Accept header, (http://www.gethifi.com/blog/browser-rest-http-accept-headers), would that be a problem?