http-string-parser
Advanced tools
Comparing version 0.0.0 to 0.0.1
{ | ||
"name": "http-string-parser", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "Parse HTTP Request and Response from String", | ||
@@ -5,0 +5,0 @@ "main": "lib/parser.js", |
@@ -9,3 +9,5 @@ # http-string-parser | ||
# Parse HTTP Message | ||
### API NOT STABLE, YET! | ||
##Parse HTTP Message | ||
```javascript | ||
@@ -20,4 +22,21 @@ var parser = require('http-string-parser'); | ||
See more about [Request][request] and [Response][response] data model. | ||
[request]: https://www.relishapp.com/apiary/gavel/docs/data-model#http-request | ||
[response]: https://www.relishapp.com/apiary/gavel/docs/data-model#http-response | ||
## API Reference | ||
`parseRequest(requestString)` | ||
`parseRequestLine(requestLine)` | ||
`parseResponse(responseString)` | ||
`parseStatusLine(statusLine)` | ||
`praseHeaders(headersLinesArray)` | ||
- - - | ||
NOTE: Proof of concept, naive HTTP parsing. In future may be replaced with better parser from Node.JS core's C bindings of NGINX Http parser | ||
NOTE: Proof of concept, naive HTTP parsing, wheel re-inventation. In future it may be replaced with better parser from [Node.JS core's C bindings of NGINX HTTP parser](https://github.com/joyent/http-parser) |
Sorry, the diff of this file is not supported yet
22738
23
40