0.1.1 • Published 7 years ago

hypermessage v0.1.1

Weekly downloads
8
License
MIT
Repository
github
Last release
7 years ago

hypermessage

Make plaintext HTTP messages as specified by RFC-7230.

Example

var hm = require('hypermessage');

var req = {
  method: 'POST',
  body: '{ "key": "value" }',
  headers: {
    'Content-Type': 'foo'
  },
  endpoint: 'https://example.com/foo?bar=baz',
  httpVersion: '2.0' // defaults to 1.1
};

console.log(hm.build(req));

Output

POST https://example.com/foo?bar=baz HTTP/2.0
Content-Type: foo

{ "key": "value" }

License

MIT

0.1.1

7 years ago

0.1.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago