How to write a Django view for a POST request

后端 未结 2 1759
太阳男子
太阳男子 2020-12-15 06:41

I have written a very small example: a junit button which sends a POST request with a pair of values:






        
2条回答
  •  一个人的身影
    2020-12-15 07:05

    This is by design. Your POST data must contain csrfmiddlewaretoken value. You can get it from your cookies and then send it with POST requests. Details here. For your specific case, you can do this -

    
    

提交回复
热议问题