-
Bug
-
Resolution: Fixed
-
Medium
Adding a callback parameter to the URL should change the Content-Type from application/json; charset=utf-8 to application/javascript; charset=utf-8
You can test this using:
curl -s -I https://api.bitbucket.org/2.0/snippets/dvdsmpsn/y6Eeg/?callback=xxx | grep "^Content-Type:"
Content-Type: application/json; charset=utf-8
This is wrong and should instead be Content-Type: application/javascript; charset=utf-8 like in most of your other REST APIs.
Compare this to another (correctly working) REST API:
Standard JSON call:
curl -s -I 'https://api.bitbucket.org/1.0/repositories/dvdsmpsn/pii-viewer-for-google-analytics/issues?status=open&status=new'| grep "^Content-Type:"
Content-Type: application/json; charset=utf-8
JSONP call with callback parameter
curl -s -I 'https://api.bitbucket.org/1.0/repositories/dvdsmpsn/pii-viewer-for-google-analytics/issues?callback=xxx&status=open&status=new'| grep "^Content-Type:"
Content-Type: application/javascript; charset=utf-8
Aside
I'm building some lightweight Atlassian Connect add-ons, so this is holding things up somewhat.
Here's the non-working Bitbucket Snippets macro (from the incorrect content-type):
https://dvdsmpsn.atlassian.net/wiki/display/issues/Bitbucket+Snippets+Macro+for+Confluence+Cloud
Form Name |
---|
This issue has been closed due to inactivity. If you continue to see problems, please reopen or create a new issue.