HTTP Methods at the command line
I am wanting to make use of a web API from the command line.
My understanding is that HTTP Methods are as follows.
GET
POST
PUT
HEAD
PATCH
OPTIONS
When I enter these individually in Konsole it displays usage info for GET
, POST
, and HEAD
but not for any of the others.
Why aren't all the methods available?
The GET
, HEAD
and POST
commands on your system are likely symbolic links to /usr/bin/lwp-request
, and are provided as part of LWP - The World-Wide Web library for Perl (installable on Ubuntu as the libwww-perl package):
$ dpkg -L libwww-perl | grep '/bin/'
/usr/bin/lwp-download
/usr/bin/lwp-dump
/usr/bin/lwp-mirror
/usr/bin/lwp-request
/usr/bin/GET
/usr/bin/HEAD
/usr/bin/POST
The simple answer to your question is that lwp-request
does not currently implement the other methods.