Make JSON requests allow text/javascript content #148

Merged
merged 1 commit into from Dec 13, 2011

Conversation

Projects
None yet
2 participants
Contributor

jakeboxer commented Dec 11, 2011

The Facebook API returns JSON with a Content-Type of text/javascript. This makes AFJSONRequestOperation error, since it's expecting text/json or application/json. Seems reasonable for AFJSONRequestOperation to accept text/javascript, since JSON is a subset of JavaScript.

@mattt mattt pushed a commit that referenced this pull request Dec 13, 2011

Mattt Thompson Merge pull request #148 from jakeboxer/patch-1
Make JSON requests allow text/javascript content
4c71f35

@mattt mattt merged commit 4c71f35 into AFNetworking:master Dec 13, 2011

Contributor

mattt commented Dec 13, 2011

Facebook Y U NO RFC 4627?

These days, I can't honestly tell if Facebook actually has a good reason to send as text/javascript (compatibility with terrible, old clients?), but FB is a sufficiently large use-case to support by default, and I agree that this should be added. Thanks for the patch, Jake!

Contributor

jakeboxer commented Dec 13, 2011

Thanks @mattt! Love the library!

@greghe greghe pushed a commit to skillz/AFNetworking that referenced this pull request Sep 3, 2015

Mattt Thompson Merge pull request #148 from jakeboxer/patch-1
Make JSON requests allow text/javascript content
1046e47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment