一個簡單的API我有一個簡單的API端點:訪問與Python
http://example.de/create.json
我需要發送通過POST如下:
-text
-url
- 用戶名
此任務的curl命令如下所示:
curl --data-urlencode "text=Beispieltext" -d "url=http://google.de" -d "username=User1" http://example.de/create.json
我想在我的代碼中實現這個。我想將數據提交給API,並使用API的答案。 其實我不知道從哪裏開始。我讀了很多關於Pycurl,urllib2和subprocess的書,但現在我什麼都不懂了:D
你會怎麼做? 我需要幫助,我不知道從哪裏開始!
[要求](http://docs.python-requests.org/en/latest/)是我最喜歡的捲曲狀的通話 –
@AlexL庫我會試一試。謝謝! –