【发布时间】:2017-10-18 01:13:07
【问题描述】:
我正在尝试使用简单的 HTTP 请求(使用 cURL)从文件的内容中创建关于 privnote.com 的注释。我只能找到关于此的唯一信息是this nodeJS app,因此我将其用作参考,但到目前为止还没有运气。
这是我目前得到的:
curl -v \
-H "Host: privnote.com" \
-H "Connection: keep-alive" \
-H "Content-Length: 153" \
-H "Origin: https://privnote.com" \
-H "X-Requested-With: XMLHttpRequest" \
-H "User-Agent: privnote-cli/0.1.0 (https://github.com/nonrational/privnote-cli)" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: */*" \
-H "DNT: 1" \
-H "Referer: https://privnote.com/" \
-H "Accept-Encoding: gzip, deflate, br" \
-H "Accept-Language: en-GB,en-US;q=0.8,en;q=0.6" \
-X POST \
--data-binary "@pst-np-v1.pem" \
"https://privnote.com/legacy/"
当我提出这个请求时,我得到了500 Internal Server Error。关于如何让它发挥作用的任何想法?
最终目标是:我正在尝试将文件的内容作为注释上传,然后通过命令行全部获取 URL。
【问题讨论】:
标签: bash curl httprequest