Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit c1cc4b7

Browse files
author
Adam Kliment
committed
Update README.md
1 parent 5f506f5 commit c1cc4b7

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
[![Dependency Status](https://david-dm.org/apiaryio/http-string-parser.png)](https://david-dm.org/apiaryio/http-string-parser)
55
[![devDependency Status](https://david-dm.org/apiaryio/http-string-parser/dev-status.png)](https://david-dm.org/apiaryio/http-string-parser#info=devDependencies)
66

7-
Parse HTTP message (Request and Response) from raw string in Node.JS
7+
Parse HTTP messages (Request and Response) from raw string in Node.JS
88

9-
##Parse HTTP Message
9+
##Parse HTTP Messages
1010
```javascript
1111
var parser = require('http-string-parser');
1212

13-
message = parser.parse(string);
13+
request = parser.parseRequest(requestString);
14+
response = parser.parseResponse(responseString);
1415

15-
console.log(message['request']);
16-
console.log(message['response']);
16+
console.log(request);
17+
console.log(response);
1718
```
1819

1920
See more about [Request][request] and [Response][response] data model.
@@ -35,4 +36,4 @@ See more about [Request][request] and [Response][response] data model.
3536

3637
- - -
3738

38-
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)
39+
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)

0 commit comments

Comments
 (0)