Strange JQuery Error “code 501, message Unsupported method OPTIONS”

前端 未结 4 1146
Happy的楠姐
Happy的楠姐 2020-12-10 14:29

I am learning the JQuery Get method. I start up a Python HTTP server:

(just typing command \"Python -m SimpleHTTPServer\").

It\'s fine to t

4条回答
  •  一向
    一向 (楼主)
    2020-12-10 14:39

    You may also need to add fields such as "Content-Type" to the allowed headers.

    self.send_header("Access-Control-Allow-Headers", "X-Requested-With, Content-Type") 
    

提交回复
热议问题