From 4c522bf93290bdae433668b807448e3840251804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Rozto=C4=8Dil?= Date: Sat, 25 Feb 2012 13:49:50 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ff1eaf8b..2eb30c9e 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ HTTPie is a CLI frontend for [python-requests](python-requests.org). httpie [flags] METHOD [header:value data-field-name=value]* URL -The default request `Content-Type` in `application/json` and data fields are automatically serialized as a JSON `Object`: +The default request `Content-Type` in `application/json` and data fields are automatically serialized as a JSON `Object`, so this: - httpie PATCH name=John api.example.com/person/1 + httpie PATCH X-API-Token:123 name=John api.example.com/person/1 -That will issue the following request: +Will issue the following request: PATCH /person/1 HTTP/1.1 User-Agent: HTTPie/0.1 @@ -24,13 +24,14 @@ That will issue the following request: Content-Type: application/json; charset=utf-8 {"name": "John"} - + +You can use the `--form` flag to set `Content-Type` and serialize the data as `application/x-www-form-urlencoded`. The data to be sent can also be passed via `stdin`: httpie PUT X-API-Token:123 api.example.com/person/1 < person.json -The flags mirror many of the arguments you would use with `requests.request`. See `httpie -h` for more details. +Most of the flags mirror the arguments you would use with `requests.request`. See `httpie -h` for more details. ### Screenshot From 0373a49d749beac20ad49d05b05391ba1460b4de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Rozto=C4=8Dil?= Date: Sat, 25 Feb 2012 13:52:29 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2eb30c9e..bc964843 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## HTTPie: cURL for humans -HTTPie is a CLI frontend for [python-requests](python-requests.org). +HTTPie is a CLI frontend for [python-requests](http://python-requests.org). ### Installation