jquery ajax returns status code 0 while requesting cross domain

前端 未结 1 863
难免孤独
难免孤独 2021-01-28 15:05

i am trying to make cross domain request but server can not response with

Access-Control-Allow-Origin: *

i am trying to read response header. w

相关标签:
1条回答
  • 2021-01-28 16:08

    have you try this jquery crossdomain plugin?

    another way is using jsonp as response type

    $.ajax({
       url: "https://accounts.google.com/o/oauth2/auth",
       type: "POST",
       dataType: 'jsonp',
       ...
    
    0 讨论(0)
提交回复
热议问题