ua-string
TypeScript icon, indicating that this package has built-in type declarations

4.1.0 • Public • Published

ua-string

Get the user agent of a recent Chrome version to pretend to be a browser in network requests

Some sites and services block non-browser requests or respond differently.

I will update this module once in a while with the latest user agent.

Install

$ npm install ua-string

Usage

import got from 'got';
import userAgentString from 'ua-string';

await got('https://sindresorhus.com', {
	headers: {
		'user-agent': userAgentString
	}
});

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i ua-string

    Weekly Downloads

    1,601

    Version

    4.1.0

    License

    MIT

    Unpacked Size

    3.07 kB

    Total Files

    5

    Last publish

    Collaborators

    • sindresorhus