New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make JSON requests allow text/javascript content #148

Merged
merged 1 commit into from Dec 13, 2011

Conversation

Projects
None yet
2 participants
@jakeboxer
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 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

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

@mattt

This comment has been minimized.

Show comment
Hide comment
@mattt

mattt Dec 13, 2011

Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@jakeboxer

jakeboxer Dec 13, 2011

Contributor

Thanks @mattt! Love the library!

Contributor

jakeboxer commented Dec 13, 2011

Thanks @mattt! Love the library!

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

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