Skip to content
Get the user agent of a recent Chrome version to pretend to be a browser in network requests
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.npmrc
.travis.yml
index.d.ts
index.js
index.test-d.ts
license
package.json
readme.md
test.js

readme.md

ua-string Build Status

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

const got = require('got');
const userAgentString = require('ua-string');

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

License

MIT © Sindre Sorhus

You can’t perform that action at this time.