Curl 无法解析代理 'PUT'
Curl coudn't resolve proxy 'PUT'
我正在尝试将 link 添加到我在使用 POST 之前创建的已存在的 RIAK 存储桶中,现在我收到以下错误。
curl -x PUT http://localhost:8091/riak/games/fallout4 -H 'Content-type: image/jpeg" -H "Link:</riak/photos/vaultboy.jpeg>;riaktag=\"photo\"" --data-binary @vaultboy.jpeg
curl:(5)Couldn't resolve proxy 'PUT'
它是 -X
大写,而不是 -x
小写,所以 :
curl -X PUT http://localhost:8091/riak/games/fallout4 -H 'Content-type: image/jpeg" -H "Link:</riak/photos/vaultboy.jpeg>;riaktag=\"photo\"" --data-binary @vaultboy.jpeg
或如@Daniel Stenberg 在评论中所述:
curl http://localhost:8091/riak/games/fallout4 -H 'Content-type: image/jpeg" -H 'Link:</riak/photos/vaultboy.jpeg>;riaktag="photo"' -T vaultboy.jpeg
来自
man curl | less +/--upload-file
:
-T, --upload-file
This transfers the specified local file to the remote URL. If there is no file part in the specified URL, curl will append
the local file name. NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no file
name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload
operation to fail. If this is used on an HTTP(S) server, the PUT command will be used.
我正在尝试将 link 添加到我在使用 POST 之前创建的已存在的 RIAK 存储桶中,现在我收到以下错误。
curl -x PUT http://localhost:8091/riak/games/fallout4 -H 'Content-type: image/jpeg" -H "Link:</riak/photos/vaultboy.jpeg>;riaktag=\"photo\"" --data-binary @vaultboy.jpeg
curl:(5)Couldn't resolve proxy 'PUT'
它是 -X
大写,而不是 -x
小写,所以 :
curl -X PUT http://localhost:8091/riak/games/fallout4 -H 'Content-type: image/jpeg" -H "Link:</riak/photos/vaultboy.jpeg>;riaktag=\"photo\"" --data-binary @vaultboy.jpeg
或如@Daniel Stenberg 在评论中所述:
curl http://localhost:8091/riak/games/fallout4 -H 'Content-type: image/jpeg" -H 'Link:</riak/photos/vaultboy.jpeg>;riaktag="photo"' -T vaultboy.jpeg
来自
man curl | less +/--upload-file
:
-T, --upload-file
This transfers the specified local file to the remote URL. If there is no file part in the specified URL, curl will append the local file name. NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload operation to fail. If this is used on an HTTP(S) server, the PUT command will be used.