New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

requested-url

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

requested-url

Get the full URL in Express applications

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

Full Request URL Build Status

Get the full request URL in Express applications

Install

npm install requested-url

Import

Node

const fullUrl = require('requested-url');

ES6 import

import fullUrl from 'requested-url';

Usage

const express = require('express');
const fullUrl = reqiure('requested-url');

cosnt app = express();

app.get('/posts/by/:userId', (req, res) => {
  console.log(fullUrl(req));
  // => https://example.com/posts/by/70122?h=true

  // ...
  // ...
});

API

fullUrl(req)

req

Type: object

Express request object representing the HTTP request.

return

Type: string

The full request URL including the protocol, host, port, path, and query string.

Test

npm install
npm test

License

MIT © Zsolt Meszaros

Keywords

express

FAQs

Package last updated on 27 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts