Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ua-string

sindresorhus7.7kMIT4.1.0TypeScript support: included

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

user-agent, user, agent, navigator, browser, chrome, network, request, fetch, got, http, header, string, recent, pretend, imitate, mimic

readme

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
    }
});