proxy.golang.org : github.com/dghubble/warp
Package warp provides a request router/mux with capture parameters, HTTP verbs, and rules. Drop-in http.ServeMux compatability. warp.ServeMux is an HTTP request multiplexer supporting routes with capture parameters, HTTP method requirements, and other rule constriants. The mux matches incoming requests against a list of registered routes and offers the following features: The warp mux was originally forked from the standard http.ServeMux and is compatible with it. The warp mux implements the same method signatures and passes all http.ServeMux tests (see serve_test.go). Handle and HandleFunc behave as they do in http.ServeMux, but allow patterns with capture parameters for variable URL parts can be used as well. A Route struct collects together a pattern, its handler, and a collection of Rules that must be satisfied for the request to match the route. HTTP Method requirements (e.g. GET, POST, PUT, DELETE, HEAD, OPTIONS) are quite common, so ServeMux provides convenience methods for each verb (e.g. mux.Get(pattern, handler)). To register routes on a warp ServeMux directly, use the `ServeMux.Register(pattern string, handler http.Handler, rules ...Rule) *Route` method.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/dghubble/warp
License: BSD-3-Clause
Latest release: over 10 years ago
First release: over 10 years ago
Namespace: github.com/dghubble
Stars: 9 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 18 days ago