How to curl -k -H with python requests -


i have curl command:

curl -k -h "x-apitokenid: 11111111-2222-...." https://staging.mycompany.com/v1/users.json 

and works ok. when translate requests:

r=requests.get("https://staging.mycompany.com/v1/user.json",headers={'authourization':'tok:11111111-2222-....'}) 

it says "unauthorized access resource." how correct this?

add x-apitokenid headers (same curl -h) , verify=false ignore verifying ssl cert (same curl -k):

r=requests.get("https://staging.mycompany.com/v1/user.json",headers={'x-apitokenid':'11111111-2222-....'}, verify=false) 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -