Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sindresorhus/ua-string

Get the user agent of a recent Chrome version to pretend to be a browser in network requests
https://github.com/sindresorhus/ua-string

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# ua-string

> Get the [user agent](https://en.wikipedia.org/wiki/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

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

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