Skip to content

Extensions Submodule > Libraries > REST Client

REST Client ​

  • Developer: REST Client
  • BrowserType: library

REST Client is a Ruby library for making HTTP and REST requests.

User-Agent Examples ​

sh
rest-client/2.1.0 (linux-gnu x86_64) ruby/2.7.2p137

Code Example ​

js
import { UAParser }  from 'ua-parser-js';
import { Libraries } from 'ua-parser-js/extensions';
import { Extension } from 'ua-parser-js/enums';

const libParser = new UAParser(Libraries);
const ua = 'rest-client/2.1.0 (linux-gnu x86_64) ruby/2.7.2p137';
const browser = libParser.setUA(ua).getBrowser();

console.log(browser);
// {name: "rest-client", version: "2.1.0", major: "2", type: "library"}

// Compare using the built-in enum
const { Library } = Extension.BrowserName;
console.log(browser.is(Library.REST_CLIENT));
// true

References ​

UAParser.js v2 is licensed under AGPLv3 or PRO licenses.