3.0.2 • Published 3 years ago

requrl v3.0.2

Weekly downloads
18,935
License
MIT
Repository
github
Last release
3 years ago

requrl

npm dt bundlephobia

Grab full URL from request.

Features

  • Universal (browser and node.js) support
  • Detect HTTPS requests using is-https
  • Support x-forwarded-proto and x-forwarded-host
  • Always encode URI
  • Super Small

Usage

import getURL from 'requrl'
// OR
const getURL = require('requrl')

Function signuture is:

function getURL(req?: IncomingMessage, includePath?: boolean): string

Example:

const url = getURL(req)
// http://localhost:3000
// https://www.foo.com

License

MIT

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.3.21

8 years ago