UNPKG
parse-headers
Version:
latest (2.0.6)
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.0.3
1.0.2
1.0.1
1.0.0
Parse http headers, works with browserify/xhr
github.com/kesla/parse-headers
kesla/parse-headers
parse-headers
/
example.js
11 lines
(9 loc)
•
297 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
var
parse =
require
(
'./parse-headers'
) , headers = [
'Date: Sun, 17 Aug 2014 16:24:52 GMT'
,
'Content-Type: text/html; charset=utf-8'
,
'Transfer-Encoding: chunked'
,
'X-Custom-Header: beep'
,
'X-Custom-Header: boop'
].
join
(
'\n'
)
console
.
log
(
parse
(headers))