0.1.7 • Published 11 months ago

rekvest v0.1.7

Weekly downloads
65
License
MIT
Repository
github
Last release
11 months ago

Rekvest

NodeJS request URL parser. Modifies the request object to include:

  • Proxy host and protocol
  • If you're on https or not
  • Remote IP address
  • Parsed query string
  • Everything else that the standard url includes

Uses the new syntax in NodeJS url.

Install

npm i rekvest

Usage

var rekvest = require('rekvest')

rekvest(req)

# URL: http://localhost:3000/?hello=1

req.href: 'http://localhost:3000/?hello=1'
req.origin: 'http://localhost:3000'
req.protocol: 'http:'
req.username: ''
req.password: ''
req.host: 'localhost:3000'
req.hostname: 'localhost'
req.port: '3000'
req.pathname: '/'
req.search: '?hello=1'
req.searchParams: URLSearchParams { 'hello' => '1' }
req.hash: ''
req.ip: '127.0.0.1'
req.query: { hello: '1' }
req.path: '/?hello=1'

MIT Licensed. Enjoy!

Created by Eldøy Projects

0.1.7

11 months ago

0.1.6

11 months ago

0.1.5

2 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago