What are browser profiles?
Browser profiles define the network profile labels that wreq-js sends to the native layer. Profiles can influence behavior such as:
- TLS handshake preferences
- HTTP protocol behavior
- Default request headers
- Platform-specific header values
Final wire behavior is determined by the native engine and may vary by profile and runtime.
Available browsers
wreq-js profile families include:
- Chrome
- Firefox
- Safari
- Edge
- Opera
- OkHttp
Listing profiles
import { getProfiles } from 'wreq-js';
const profiles = getProfiles();
console.log(profiles);
// ['chrome_142', 'chrome_141', 'firefox_139', 'safari_18', ...]
Using a profile
Specify the browser option in your fetch call:
import { fetch } from 'wreq-js';
const response = await fetch('https://example.com', {
browser: 'chrome_142',
});
Operating systems
Different operating systems have different header values and behaviors. Use the os option to emulate a specific platform:
import { getOperatingSystems } from 'wreq-js';
console.log(getOperatingSystems());
// ['windows', 'macos', 'linux', 'android', 'ios']
Example: Windows Chrome
const response = await fetch('https://example.com', {
browser: 'chrome_142',
os: 'windows',
});
Example: iOS Safari
const response = await fetch('https://example.com', {
browser: 'safari_18',
os: 'ios',
});
Profile updates
Profile labels are sourced from the native layer and can evolve with upstream updates.
Use a recent version of wreq-js if you want the latest profile set.
By default, browser emulation headers are automatically added. To use only your custom headers:
const response = await fetch('https://api.example.com', {
browser: 'chrome_142',
headers: {
'Accept': '*/*',
'User-Agent': 'CustomBot/1.0',
},
disableDefaultHeaders: true,
});