I want to do a Post-Request using Axios. It has to unclude Headers, a Body and uses a Proxy. For some reason it doesn't work when I add the Headers or the Body (it doesn't use the Proxy)
await axios.post(
baseUrl, {
"email": mail,
"username": username,
"password": password,
"invite": invite,
"consent": true,
"date_of_birth": birthday,
"gift_code_sku_id": null,
"captcha_key": key
}, {
headers: {
"Host": "discord.com",
"Authorization": "undefined",
"Accept-Language": "en-US",
"User-Agent": randomUserAgent(),
"Content-Type": "application/json",
"Origin": "https://discord.com",
"Referer": "https://discord.com/register",
"Accept-Encoding": "gzip, deflate, br"
}
}, {
proxy: {
host: pickedProxy.split(":")[0],
port: pickedProxy.split(":")[1],
auth: {
username: pickedProxy.split(":")[2],
password: pickedProxy.split(":")[3]
}
}
});