Skip to content

Commit

Permalink
Update README to include examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nojima committed Jun 17, 2019
1 parent 65e351c commit eeb8c75
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,43 @@

![httpie-go screenshot](./docs/images/screenshot.png)

[httpie](https://httpie.org/)-like HTTP client written in Go.
**httpie-go** (`ht`) is a user-friendly HTTP client CLI.
Requests can be issued with fewer types compared to `curl`.
Responses are displayed with syntax highlighting.

Currently under development...
httpie-go is a clone of [httpie](https://httpie.org/).
Since httpie-go is written in Go, it is single a single binary and does not require a heavy runtime.

## Examples

This example sends a GET request to http://httpbin.org/get.

```bash
$ ht GET httpbin.org/get
```

The second example sends a POST request with JSON body `{"hello": "world", "foo": "bar"}`.

```bash
$ ht POST httpbin.org/post hello=world foo=bar
```

You can see the request that is being sent with `-v` option.

```bash
$ ht -v POST httpbin.org/post hello=world foo=bar
```

Request HTTP headers can be specified in the form of `key:value`.

```bash
$ ht -v POST httpbin.org/post X-Foo:foobar
```

## Documents

Although httpie-go does not currently have documents, you can refer to the original [httpie's documentation](https://httpie.org/doc) since httpie-go is a clone of httpie.
Note that some minor options are yet to be implemented in httpie-go.

## How to build

Expand Down

0 comments on commit eeb8c75

Please sign in to comment.