Skip to content
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

API - Wrong HTTP Content-Type and callback missing #86

Closed
0ip opened this issue Aug 16, 2011 · 1 comment
Closed

API - Wrong HTTP Content-Type and callback missing #86

0ip opened this issue Aug 16, 2011 · 1 comment

Comments

@0ip
Copy link
Member

0ip commented Aug 16, 2011

Instead of sending text/html it should be application/json.


As well a callback function would be good. See https://secure.wikimedia.org/wikipedia/en/wiki/JSONP for more information.

Example

Without callback

Req ?apikey=secret
Res {"code":4,"message":"no or wrong API Key","data":null}

With callback

Req ?apikey=secret&callback=test
Res test({"code":4,"message":"no or wrong API Key","data":null})

@Pita
Copy link
Contributor

Pita commented Aug 17, 2011

made this with ?jsonp= instead of callback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants