[SERVER-8977] Simple REST Interface --JSONP sending wrong MIME type Created: 14/Mar/13 Updated: 07/Jul/17 Resolved: 07/Jul/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | HTTP Console |
| Affects Version/s: | 2.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Craig Vitter | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Running on MacOS 10.7.5 - problem not verified on other platforms |
||
| Operating System: | OS X |
| Steps To Reproduce: | Start server with: mongod --rest --jsonp |
| Participants: |
| Description |
|
I am having a play with the Simple REST Interface via "mongod --rest --jsonp" and have run into the following error when making calls with JQquery: Resource interpreted as Script but transferred with MIME type text/plain The JQuery I am using is pretty standard: $.ajax({ }, }); |
| Comments |
| Comment by Zak [ 25/Apr/13 ] |
|
Hi, Are you pulling the data from mongo directly or are you making the request to a webserver. In that case you should probably try this jquery library for JSONP requests. You can download it from this link: https://github.com/jaubourg/jquery-jsonp/blob/master/doc/API.md |