http-raw-request
v2.0.2
Published
Generate http request message
Downloads
7
Readme
http-raw-request
Generate http request message
Install
npm i http-raw-request
Usage
Simple example
Script:
const httpRawRequest = require('http-raw-request');
const params = {
httpVersion: '1.1',
method: 'POST',
url: '/'
};
const headers = { Host: 'localhost' };
const body = 'Hello world'
const request = httpRawRequest(params, headers, body);
HTTP Request:
POST / HTTP/1.1
Host: localhost
User-Agent: User-Agent
Hello world
Test
npm run test
License
MIT © nlapshin