https://github.com/tideland/go-httpx
Convenient extension to net/http for the creation of RESTful APIs.
https://github.com/tideland/go-httpx
go golang http restful-api web
Last synced: about 1 year ago
JSON representation
Convenient extension to net/http for the creation of RESTful APIs.
- Host: GitHub
- URL: https://github.com/tideland/go-httpx
- Owner: tideland
- License: bsd-3-clause
- Created: 2021-11-10T20:52:29.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-27T19:11:42.000Z (about 4 years ago)
- Last Synced: 2024-06-21T14:03:45.761Z (almost 2 years ago)
- Topics: go, golang, http, restful-api, web
- Language: Go
- Homepage:
- Size: 89.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tideland Go HTTP Extensions
[](https://github.com/tideland/go-httpx)
[](https://raw.githubusercontent.com/tideland/go-httpx/master/LICENSE)
[](https://github.com/tideland/go-httpx/blob/master/go.mod)
[](https://pkg.go.dev/mod/tideland.dev/go/httpx?tab=packages)

[](https://goreportcard.com/report/tideland.dev/go/httpx)
## Description
**Tideland Go HTTP Extensions** contains helper functions extending the standard
`net/http` package for the daily work with HTTP.
Most important tasks are the wrapping of standard `net/http` handlers with
non-functional tasks like logging, recovery, authorization, throttling, and
adding of CORS and ETag headers. Additionally the package contains a convenient
way to map the HTTP methods to individual handler methods, like a `POST` to the
method `ServerHTTPPost()`. In case the handler does not implement the matching
method, the error code `http.ErrMethodNotAllowed` will be returned to the client.
For RESTful APIs also the nesting of handlers and the parsing of paths for URIs
like `/api/v1/users/{user-id}/orders/{order-id}` are supported. Additionally the
work with different content types is simplified.
## Contributors
- Frank Mueller (https://github.com/themue / https://github.com/tideland / https://tideland.dev)