An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/vfaronov/httpheader

Package httpheader parses and generates standard HTTP headers. For each header Foo-Bar covered by this package, there is a function FooBar to parse it, SetFooBar to generate it, and sometimes AddFooBar to append to it. Note that AddFooBar creates a new Foo-Bar header line (like http.Header's Add method), which, although correct, is poorly supported by some recipients. FooBar parses all valid Foo-Bar headers, but many invalid headers are also tolerated and parsed to some extent. FooBar never errors, instead returning whatever it can easily salvage. Do not assume that strings returned by FooBar conform to the grammar of the protocol. Likewise, SetFooBar doesn't validate parameter names or other tokens you supply. However, it will automatically quote and escape your text where the grammar admits an arbitrary quoted string or comment (RFC 7230 Section 3.2.6), such as in parameter values. Tokens that are known to be case-insensitive, like directive or parameter names, are lowercased by FooBar, unless documented otherwise. Any maps returned by FooBar may be nil when there is no corresponding data.

Ecosystem
proxy.golang.org
Latest Release
v0.1.0
over 6 years ago
Versions
1
Dependent Packages
13
Dependent Repos
1
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/vfaronov/httpheader
spec
License MIT
Namespace github.com/vfaronov
First Release over 6 years ago
Last Synced 21 days ago
Repository
Stars 27 on GitHub
Forks 1 on GitHub
Rankings on proxy.golang.org
Overall Top 6.7%
Dependent packages Top 1.4%
Dependent repos Top 4.8%