Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Make JSON requests allow text/javascript content #148

Merged
merged 1 commit into from Dec 13, 2011
Merged

Make JSON requests allow text/javascript content #148

merged 1 commit into from Dec 13, 2011

Conversation

jakeboxer
Copy link
Contributor

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 pushed a commit that referenced this pull request Dec 13, 2011
Make JSON requests allow text/javascript content
@mattt mattt merged commit 4c71f35 into AFNetworking:master Dec 13, 2011
@mattt
Copy link
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!

@jakeboxer
Copy link
Contributor Author

Thanks @mattt! Love the library!

greghe pushed a commit to skillz/AFNetworking that referenced this pull request Sep 3, 2015
Make JSON requests allow text/javascript content
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants