More than 5 years have passed since last update.
-
urllib
かrequests
で毎回ググッてたのでメモを残すとした
- これで
header
とparameter
送りつけます
import json
import requests
url = 'https://hoge.com'
data = {
'hoge': 'fuga',
'fuga' : {'fuga1': 'いいね', 'fuga2': 'だめよ'}
}
headers = {'Content-Type': 'application/json'}
requests.post(url,data=json.dumps(data), headers=headers)
Why not register and get more from Qiita?
- We will deliver articles that match you
By following users and tags, you can catch up information on technical fields that you are interested in as a whole
- you can read useful information later efficiently
By "stocking" the articles you like, you can search right away
Sign upLogin