1
我正在計劃使用文本上傳網站http://textuploader.com/,但我似乎無法理解這一點。我可能沒有看上去很難,但那不是重點。我真正想要的只是如何執行這些命令,或者只是如何使用「HTTPClient」來做這些事情。包含所有命令和信息的網站是here。此外,只是爲了方便起見,我要離開最重要的對我來說,在這個帖子:HTTPClient代碼中的CURL命令
POST: /posts
This will allow you to post to your account.
{
"Title": "Sample Title",
"Content": "Post body goes here.",
"Type": "public"
}
Example:
curl -X POST "http://api.textuploader.com/v1/posts" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-TextUploader-API-Key: your-api-key-here" \
-v \
-d '{"title": "Sample Title", "content": "Post body goes here.", "type": "public"}'
And this:
GET: /posts/[shortcode]
This method will return the complete body of the requested shortcode.
檢查我的答案在這裏http://stackoverflow.com/questions/36475076/how-to-make-post-curl-request-in-java –
啊,謝謝你,完美! – Dankrushen