@advanced-rest-client/arc-url

A module with logic an UI regions to support URL processing in Advanced REST Client application. It contains a logic to safely parse url with variables, build a URL input, or to enter any arbitrary URL with autosuggestions.


Keywords
advanced-rest-client, url, parser, deprecated
License
Apache-2.0
Install
npm install @advanced-rest-client/arc-url@0.2.2

Documentation

Build Status

A URL parsing library for Advanced REST Client.

It provides an interface similar to the URL class but it is more relax in terms of input validitiy. It means that it won't throw an error when the URL is invalid. This allows to use the library in request editors.

Usage

Installation

npm install --save @advanced-rest-client/url-parser

Example

import { UrlParser } from '@advanced-rest-client/url-parser';
const parser = new UrlParser('https:///path-with-missing-host?qury=value#string');
console.log(parser.protocol);
console.log(parser.host);
console.log(parser.path);
console.log(parser.searchParams);
console.log(parser.anchor);

Development

git clone https://github.com/advanced-rest-client/url-parser
cd url-parser
npm install

Running the tests

npm test