Custom Headers
Add your own headers to a request and get customised results.
Custom HTTP headers are useful when you want to provide additional information to your request. If your request requires passing custom HTTP headers, all you have to do is to append WSA- to your header's name and add them to your request.
Web Stealth Proxy Custom Headers Examples
curl -k -x "http://stealthproxy.webscrapingapi.com:80" -U "<YOUR-PROXY-USERNAME>:<YOUR-PROXY-PASSWORD>" -X GET "https://httpbin.org/get" --header "WSA-random-header: random" "const axios = require('axios');
const https = require('https');
const instance = axios.create({
httpsAgent: new https.Agent({
rejectUnauthorized: false
})
});
instance.get('https://httpbin.org/get', {
proxy: {
host: 'stealthproxy.webscrapingapi.com',
port: 8000,
auth: {
username: '<YOUR-PROXY-USERNAME>',
password: '<YOUR-PROXY-PASSWORD>'
},
headers: {
"WSA-random-header": "random"
}
}
}).then(function (response) {
console.log(response.data);
}, (err) => {
console.log(err)
})Last updated