thoughtbot / carnival

An unobtrusive, developer-friendly way to add comments
MIT License
501 stars 30 forks source link

Include Accept header in getUser request #197

Closed pbrisbin closed 9 years ago

pbrisbin commented 9 years ago

Now that we rely on Yesod's automatic JSON responses to authentication routes, we must supply a proper Accept header to get them.

pbrisbin commented 9 years ago

Noticed on Staging

jferris commented 9 years ago

Should we also set this for other JSON XMLHttpRequests?

pbrisbin commented 9 years ago

Within Carnival.get probably, because we only use that to pull in JSON comments. Carnival.post though is used for both Logging in (where we want an HTML response) and creating comments (where we want a JSON response), so I'd need to refactor it before I could do such a thing.

I elected to only touch the one that's currently buggy for this PR.

jferris commented 9 years ago

Sounds good. Merge at will.