Git Product home page Git Product logo

postman-url-encoder's Introduction

Postman URL Encoder Build Status codecov

Postman URL Encoder is a NodeJS module that provides various URL encoding related APIs. This module is created to implement the WHATWG URL specification to remove dependency on Node's URL APIs across Postman systems. These APIs are useful to encode different parts (like hostname, path, query) of URL and convert PostmanUrl object into Node's Url like object.

Installing the Postman URL Encoder

Postman URL Encoder can be installed using NPM or directly from the git repository within your NodeJS projects. If installing from NPM, the following command installs the module and saves in your package.json

> npm install postman-url-encoder --save

Getting Started

Following example snippet shows how to convert PostmanUrl object into Node's Url like object.

var PostmanUrl = require('postman-collection').Url,
    pmEncoder = require('postman-url-encoder'),
    myUrl;

// Create PostmanUrl object
myUrl = new PostmanUrl('http://example.com/p/a/t/h?q1=v1');

// convert PostmanUrl object to Node's Url like object
myUrl = pmEncoder.toNodeUrl(myUrl));
// {
//   protocol: 'http:',
//   slashes: true,
//   auth: null,
//   host: 'example.com',
//   port: null,
//   hostname: 'example.com',
//   hash: null,
//   search: '?q1=v1',
//   query: 'q1=v1',
//   pathname: '/p/a/t/h',
//   path: '/p/a/t/h?q1=v1',
//   href: 'http://example.com/p/a/t/h?q1=v1'
// }

To know more about provided APIs, head over to Postman URL Encoder Docs.

postman-url-encoder's People

Contributors

codenirvana avatar dependabot-preview[bot] avatar dependabot[bot] avatar samvelraja avatar shamasis avatar snyk-bot avatar vikicoder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

postman-url-encoder's Issues

Trying to get in touch with you regarding a security issue

Hi there,

I couldn't find a SECURITY.md in your repository and so am not sure how to best contact you privately to disclose the security issue.

Can you add a SECURITY.md file with your e-mail to your repository, so that I know who to contact? GitHub suggests that a security policy is the best way to make sure security issues are responsibly disclosed.

Once you've done that, please let me know so I can ping you the info.

Thanks! (cc @JamieSlome)

Bundled punycode module is deprecated

While reading the Postman JavaScript reference I discovered that Postman uses the deprecated punycode module.

https://nodejs.org/api/punycode.html:

The version of the punycode module bundled in Node.js is being deprecated. In a future major version of Node.js this module will be removed. Users currently depending on the punycode module should switch to using the userland-provided Punycode.js module instead. For punycode-based URL encoding, see url.domainToASCII or, more generally, the WHATWG URL API.

It doesn't seem to be too much effort to fix, yet it has to be done across multiple affected repositories:
https://github.com/search?q=org%3Apostmanlabs+punycode&type=Code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.