1.0.1 • Published 2 years ago

format-headers v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

format-headers

Easily formatting HTTP fetch headers.

Usage

import { formatHeaders } from 'format-headers';
let str = `accept-ranges: bytes
access-control-allow-origin: *
access-control-expose-headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
cache-control: public, max-age=60, s-maxage=60
content-encoding: gzip`

console.log(formatHeaders(str)); // Returns object
1.0.1

2 years ago

1.0.0

2 years ago