Custom Cookies
Add your own cookies to a request and get customised results.
Custom cookies are treated just as custom headers. In order to add your own cookie to the request, simply pass the name and value to the WSA-Cookie custom header when you send your request.
Web Stealth Proxy Custom Cookies Examples
curl -k -x "http://stealthproxy.webscrapingapi.com:80" -U "<YOUR-PROXY-USERNAME>:<YOUR-PROXY-PASSWORD>" -X GET "https://httpbin.org/get" --header "WSA-Cookie: SID=abcd" "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-Cookie": "SID=abcd"
}
}
}).then(function (response) {
console.log(response.data);
}, (err) => {
console.log(err)
})Last updated