Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
charonn0
on March 20, 2016
|
parent
|
context
|
favorite
| on:
$ cat ~/myfile | curl -X PUT --upload-file “-” htt...
FYI The "-X PUT" argument is not doing what you think it is[1], and is superfluous since you're using "--upload-file".
You almost never really want "-X".
[1]:
https://curl.haxx.se/docs/manpage.html#-X
lsaferite
on March 21, 2016
[–]
Just to clarify your point, --upload-file with a trailing slash results in a POST and without a trailing slash it results in a PUT.
charonn0
on March 21, 2016
|
parent
[–]
Right. -X overrides this default behavior without otherwise affecting the semantics of the request.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
You almost never really want "-X".
[1]: https://curl.haxx.se/docs/manpage.html#-X