Top 4.7% dependent repos on proxy.golang.org
proxy.golang.org : github.com/dolab/httpdispatch
Package httpdispatch is a trie based high performance HTTP request dispatcher. A trivial example is: The router matches incoming requests by the request method and the path. If a handler is registered for this path and method, the router delegates the request to that function. For the methods OPTIONS, GET, POST, PUT, PATCH and DELETE shortcut functions exist to register handlers, for all other methods *dispatcher.Handler can be used. The registered path, against which the router matches incoming requests, can contain two types of parameters: Named parameters are dynamic path segments. They match anything until the next '/' or the path end: Wildcard parameters match anything until the path end, including the directory index (the '/' before the wildcard). Since they match anything until the end, wildcard parameters must always be the final path element. The value of parameters is saved as a slice of the Param struct, consisting each of a key and a value. The slice is passed to the Handle func as a third parameter. There are two ways to retrieve the value of a parameter:
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/dolab/httpdispatch
License: MIT
Latest release: over 5 years ago
First release: over 5 years ago
Namespace: github.com/dolab
Dependent repositories: 1
Stars: 7 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 20 days ago