Skip to content

Commit

Permalink
More README fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
mtesauro committed Feb 20, 2013
1 parent ff1ff07 commit 3243457
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,42 @@ DO NOT QUOTE ARGUMENTS TO COMMAND LINE OPTIONS IN THE CONFIGURATION FILE!+

=== Using jerry-curl ===

jerry-curl works by calling curl like the below:+
jerry-curl works by calling curl like the below:
----
curl [config options] [BASE][URLPATH] [command-line arguments]
----

jerry-curl command-line options:+
-c, --config FILE Select a different config file from the default+
which is $HOME/.jerry-curl/jerry-curl.config+
Example: jerry-curl --config=./my-custom-config+
-s, --show Show the curl command - DO NOT EXECUTE IT+
-u, --url-path URLPATH Set a path to append to the base URL+
Example: jerry-curl --url-path=/app/path/here+
-h, --help help, aka this message+
jerry-curl command-line options: +
-c, --config FILE Select a different config file from the default +
which is $HOME/.jerry-curl/jerry-curl.config +
Example: jerry-curl --config=./my-custom-config +
-s, --show Show the curl command - DO NOT EXECUTE IT +
-u, --url-path URLPATH Set a path to append to the base URL +
Example: jerry-curl --url-path=/app/path/here +
-h, --help help, aka this message +

[NOTE]
=================
Note: Options --config, -c, -s -u are used by both jerry-curl and curl. jerry-curl will detect when it is unclear if options are for curl or jerry-curl and provide info on the curl alternative options. If you want those options sent to curl, please use the alternate forms. Using --show can help diagnose if jerry-curl or curl is receiving a command-line option
Options --config, -c, -s -u are used by both jerry-curl and curl. jerry-curl will detect when it is unclear if options are for curl or jerry-curl and provide info on the curl alternative options. If you want those options sent to curl, please use the alternate forms. Using --show can help diagnose if jerry-curl or curl is receiving a command-line option
=================

=== Examples ===

Assuming you have the following in your configuration file:+
BASE=https://example.com/api/v1+
Assuming you have the following in your configuration file:
----
BASE=https://example.com/api/v1 +
--proxy 127.0.0.1:8080 +
-include +
-H X-Auth-Token: 55555555-5555-5555-5555-555555555555 +
-H Accept: application/json +
-H Content-Type: application/json +
----

$ jerry-curl --url-path /uppercase/word -X GET

would result in the following curl command:

$ /usr/bin/curl --proxy 127.0.0.1:8080 -include -H "X-Auth-Token: 55555555-5555-5555-5555-555555555555" -H "Accept: application/json" -H "Content-Type: application/json" -X GET \https://example.com/uppercase/word
$ /usr/bin/curl --proxy 127.0.0.1:8080 -include -H "X-Auth-Token: 55555555-5555-5555-5555-555555555555" -H "Accept: application/json" -H "Content-Type: application/json" -X GET https://example.com/uppercase/word

$ jerry-curl --url-path /uppercase/word -X POST -d '{"word" : "example"}'

Expand Down

0 comments on commit 3243457

Please sign in to comment.