Python Request Post with param data

前端 未结 3 584
粉色の甜心
粉色の甜心 2020-11-27 09:39

This is the raw request for an API call:

POST http://192.168.3.45:8080/api/v2/event/log?sessionKey=b299d17b896417a7b18f46544d40adb734240cc2&format=json H         


        
3条回答
  •  情深已故
    2020-11-27 10:27

    Assign the response to a value and test the attributes of it. These should tell you something useful.

    response = requests.post(url,params=data,headers=headers)
    response.status_code
    response.text
    
    • status_code should just reconfirm the code you were given before, of course

提交回复
热议问题