How to use cURL to send Cookies?

前端 未结 5 1827
孤独总比滥情好
孤独总比滥情好 2020-11-30 17:09

I read that Send cookies with curl works, but not for me.

I have a REST endpoint as:

class LoginResource(restful.Resource):
    def get(         


        
5条回答
  •  攒了一身酷
    2020-11-30 17:33

    This worked for me:

    curl -v --cookie "USER_TOKEN=Yes" http://127.0.0.1:5000/
    

    I could see the value in backend using

    print request.cookies
    

提交回复
热议问题