http-raw-request
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i http-raw-request

Weekly Downloads

1

Version

2.0.2

License

MIT

Unpacked Size

5.44 kB

Total Files

9

Last publish

Collaborators

  • nlapshin