response code 0 getting JSON from a website

前端 未结 2 1560
逝去的感伤
逝去的感伤 2021-01-27 06:49

i am having a problem with the below code , it whenever i would try to request a the JSON data from the website , i would always get back a response code 0. Does anyone know why

2条回答
  •  梦如初夏
    2021-01-27 07:38

    The status code will be 0 for illegal cross-origin requests, see XMLHttpRequest status 0 (responseText is empty) and XMLHTTPRequest.status returns 0 and responseText is blank in FireFox 3.5.

    Also, on FF the status code will be 0 for local file:// requests.

提交回复
热议问题