Answers for "execute curl using python"

8

Curl in python

import requests

headers = {
    'Content-type': 'application/json',
}

data = '{"text":"Hello, World!"}'

response = requests.post('https://hooks.slack.com/services/asdfasdfasdf', headers=headers, data=data)
Posted by: Guest on June-05-2020
1

python run curl

import requests
res = requests.get('https://stackoverflow.com/questions/26000336')
Posted by: Guest on June-26-2020

Code answers related to "execute curl using python"

Python Answers by Framework

Browse Popular Code Answers by Language