error: [Errno 32] Broken pipe

前端 未结 2 1721
孤独总比滥情好
孤独总比滥情好 2020-12-10 04:02

I am working on a Django project. All went well till I created an Ajax request to send values from the html page to the backend (views.py).

When I send the data usi

2条回答
  •  自闭症患者
    2020-12-10 04:43

    I have solved this problem by adding this:

    self.send_header("Access-Control-Allow-Origin", "*")
    

    Because I found some error on sending post request page:

    No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is there
    

    Then I got this solution and solved above problem.

提交回复
热议问题