jQuery XML REST Access-Control-Allow-Origin

I am calling [Version One REST API][1] and keep getting `XMLHttpRequest cannot load https://www10.v1host.com/... Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.` javascript error. I am sending GET request and XML content is expected to be returned in response. This is my jQuery code: $.ajax({ dataType: "xml", url: "https://www10.v1host.com/...", success: function(data, status, xhr) { alert("Load was performed."); } }); I have changed `dataType: "jsonp`" and with this I get response in this format: jsonp1294354293197() But get another javascript error: "`Uncaught SyntaxError: Unexpected token

以上就是jQuery XML REST Access-Control-Allow-Origin的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏