ajax jquery simple get request

前端 未结 5 2070
天命终不由人
天命终不由人 2021-02-03 23:31

I am making this simple get request using jquery ajax:

$.ajax({
    url: \"https://app.asana.com/-/api/0.1/workspaces/\",
    type: \'GET\',
    success: functio         


        
5条回答
  •  星月不相逢
    2021-02-03 23:38

    It seems to me, this is a cross-domain issue since you're not allowed to make a request to a different domain.

    You have to find solutions to this problem: - Use a proxy script, running on your server that will forward your request and will handle the response sending it to the browser Or - The service you're making the request should have JSONP support. This is a cross-domain technique. You might want to read this http://en.wikipedia.org/wiki/JSONP

提交回复
热议问题