Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,17 @@ Or download a [binary package](https://github.com/rs/curlie/releases/latest).

Synopsis:

$ curlie [CURL_OPTIONS...] [METHOD] URL [ITEM [ITEM]]
```sh
curlie [CURL_OPTIONS...] [METHOD] URL [ITEM [ITEM]]
```

Simple GET:

![](doc/get.png)
![Simple GET request example](doc/get.png)

Custom method, headers and JSON data:

![](doc/put.png)
![Custom PUT request with headers and JSON data example](doc/put.png)

When running interactively, `curlie` provides pretty-printed output for json. To force pretty-printed output, pass `--pretty`.

Expand All @@ -77,13 +79,13 @@ When running interactively, `curlie` provides pretty-printed output for json. To
Build with [goreleaser](https://goreleaser.com) to test that all platforms compile properly.

```sh
goreleaser --snapshot --skip-publish --rm-dist
goreleaser build --clean --snapshot
```

Or with `go build` for your current platform only.
Or for your current platform only.

```sh
go build .
goreleaser build --clean --snapshot --single-target
```

## Differences with httpie
Expand Down
10 changes: 9 additions & 1 deletion args/curlopts.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package args

import "sort"

var (
curlShortValues = "EKCbcdDFPHhmoUQreXYytzTuAw"
curlLongValues = []string{
Expand Down Expand Up @@ -77,6 +79,7 @@ var (
"proto",
"proto-default",
"proto-redir",
"proxy",
"proxy-cacert",
"proxy-capath",
"proxy-cert",
Expand Down Expand Up @@ -133,5 +136,10 @@ var (
"url-query",
"user",
"user-agent",
"write-out"}
"write-out",
}
)

func init() {
sort.Strings(curlLongValues)
}
Loading