Skip to content

Repository files navigation

mini

Release

A tiny, dependency-free HTTP client for Go.

mini exposes a straightforward request/response API with no third-party dependencies. It keeps memory use small, so it is comfortable in embedded runtimes, and it can be vendored directly into any project.

Installation

go get github.com/libnudget/mini@latest

Usage

import"github.com/libnudget/mini"resp, err:=mini.Get("https://example.com/health")
iferr!=nil {
panic(err)
}
fmt.Printf("%d %s\n", resp.StatusCode, resp.Body)

With a client:

client:=mini.New(
mini.WithTimeout(5*time.Second),
mini.WithHeader("Authorization", "Bearer token"),
)
resp, err:=client.Post("https://example.com/api", []byte(`{"a":1}`))

Development

go vet ./...
go test ./...
gofmt -l .

License

MIT

About

A minimal Go utility library.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages