Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wuriyanto48 committed Jan 5, 2019
1 parent 2583469 commit b6a32a8
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ $ go install github.com/Bhinneka/gubrak/cmd/gubrak
$ gubrak --version
```

- create `config.json` file with signature like this:
#### Send `JSON` payload
create `config.json` file with signature like this for `"Content-Type" : application/json`:
```json
{
"url": "http://example.com",
Expand All @@ -48,6 +49,20 @@ $ gubrak --version
}
```

#### Send `form-urlencoded` payload
create `config.json` file with signature like this for `"Content-Type": "application/x-www-form-urlencoded"`:
```json
{
"url": "http://example.com",
"headers": {
"Authorization": "Basic exnfekeoeoeojsjalaljahhd",
"Content-Type": "application/json",
"Accept": "application/json"
},
"payload": "from=Bob&content=hello from bob"
}
```

- run `gubrak`
```shell
$ gubrak -m get -c /Users/wurianto/Documents/config.json -u https://jsonplaceholder.typicode.com/posts -r 100
Expand Down

0 comments on commit b6a32a8

Please sign in to comment.