My question is very simple : is it possible to send a HTTP request from the *nix command line specifying a file, containing all the parameters, as an argument?
In REST APIs documentation, we often see that kind of specification
POST /oauth/token HTTP/1.1
Host: api.example.com
Content-Type: application/x-www-form-urlencoded
grant_type=password
&client_id=
&client_secret=
&username=
&password=
To avoid command lines that are very long and uneasy to edit, is it possible to put these informations in a file, in the above-mentioned format (which seems pretty standard) ? Ideally something with curl that would look like
curl --input-file myparameters.txt
I could not find such feature in curl documentation. Maybe with another command line tool? Thanks in advance.
No comments:
Post a Comment