use*_*697 1 json wget http-headers
我正在尝试使用在 Windows Server 2003 上运行的 wget 1.11.4 对网站执行一些 JSON。我可以正常检索信息,但我无法发送任何信息。我不确定我的 JSON 格式是否正确,但似乎存在更根本的问题。
如果我做:
wget --header="Authorization: Bearer <redacted>" --no-check-certificate --post-data="{'workspaces':{'title':'CMC Regulatory Support','creator_role':'maven'}}" https://api.mavenlink.com/api/v1/workspaces.json
Run Code Online (Sandbox Code Playgroud)
我从站点“ERROR 422: Unprocessable Entity”收到一个 JSON 错误。但是,如果我添加另一个 --header:
wget -S --header="Authorization: Bearer <redacted>" -–header="Content-Type: application/json" --no-check-certificate --post-data="{'workspaces':{'title':'CMC Regulatory Support','creator_role':'maven'}}" https://api.mavenlink.com/api/v1/workspaces.json
Run Code Online (Sandbox Code Playgroud)
我得到:
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc
wget: invalid option -- û
Usage: wget [OPTION]... [URL]...
Try `wget --help' for more options.
Run Code Online (Sandbox Code Playgroud)
但是手册明确指出允许使用多个 --header 开关,我看到网络上的示例中使用了 swithc 吗?。跆拳道?
| 归档时间: |
|
| 查看次数: |
5804 次 |
| 最近记录: |