Skip to content

Extensions Submodule > Libraries > Java HTTP Client

Java HTTP Client ​

  • Developer: Oracle
  • BrowserType: library

Java HTTP Client is the standard Java API for sending HTTP requests and receiving responses.

User-Agent Examples ​

sh
Java-http-client/11.0.6

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 browser = libParser.setUA('Java-http-client/11.0.6').getBrowser();

console.log(browser);
// {name: "Java-http-client", version: "11.0.6", major: "11", type: "library"}

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

References ​

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