Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 1 month ago
JSON representation
Get the user agent of a recent Chrome version to pretend to be a browser in network requests
- Host: GitHub
- URL: https://github.com/sindresorhus/ua-string
- Owner: sindresorhus
- License: mit
- Created: 2016-11-04T09:38:26.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2023-11-04T12:25:41.000Z (about 1 year ago)
- Last Synced: 2024-04-14T10:28:46.432Z (7 months ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 36
- Watchers: 7
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
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
}
});
```