Skip to content

uri.jsvshttptools

MIT 104 2 6,236
99 (month) Jun 18 2013 0.1.3(2022-06-28 06:09:19 ago)
1,316 3 23 MIT
Dec 28 2012 123.6 million (month) 0.7.1(2025-10-10 03:54:20 ago)

URI.js is a lightweight JavaScript library for working with URLs and URIs in Node.js and the browser. It provides a simple and consistent interface for parsing, manipulating, and building URLs and URIs.

httptools is a package for parsing and modifying HTTP protocol strings which supports HTTP1.1 and HTTP2 protocol versions.

httptools is a Python binding for the nodejs HTTP parser. The package is available on PyPI: pip install httptools

Example Use


```javascript const URI = require('uri-js'); // parse url for values const parsedUrl = URI.parse("https://www.example.com/search?q=query+string#fragment"); console.log(parsedUrl); /* Output: { scheme: 'https', authority: 'www.example.com', path: '/search', query: 'q=query+string', fragment: 'fragment' } */ // create url from values const urlComponents = { scheme: 'https', authority: 'www.example.com', path: '/search', query: 'q=query+string', fragment: 'fragment' }; const url = URI.serialize(urlComponents); console.log(url); // Output: 'https://www.example.com/search?q=query+string#fragment' ```

Alternatives / Similar


Was this page helpful?