syntax error: unexpected token <

后端 未结 15 2157
一整个雨季
一整个雨季 2020-11-29 02:20

I\'ve tried many things and there\'s no way, always appears this error I tried to use only one option to see if passed, changed the call of jquery, but not.

I looked

15条回答
  •  自闭症患者
    2020-11-29 03:01

    The error SyntaxError: Unexpected token < likely means the API endpoint didn't return JSON in its document body, such as due to a 404.

    In this case, it expects to find a { (start of JSON); instead it finds a < (start of a heading element).

    Successful response:

    
      
      
        {"foo": "bar", "baz": "qux"}
      
    
    

    Not-found response:

    
      
      
        

    Not Found

    The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

    Try visiting the data endpoint's URL in your browser to see what's returned.

提交回复
热议问题