Good evening
I'm having trouble converting this code
<form action="https://www.personal.com.py/ApiComerciosMaven/webresources/autenticacion/" method="post">
<p>
AUTENTICAR USUARIO
</P>
<p style="font-size:medium;font-weight:bold;">USUARIO
<input type="text" name="usuario" value="test">
</p>
<p style="font-size:medium;font-weight:bold;">CLAVE
<input type="text" name="clave" value="test">
</p>
<p>
<input type="submit" value="AUTENTICAR"/>
</p>
</P>
</form>
For axios, I tried this
axios.post('https://www.personal.com.py/ApiComerciosMaven/webresources/autenticacion/', {usuario: 'AA', clave: 'AA'}).then(req => {
console.log('Req done: ', req)
}).catch(err => {
console.error('Error: ', err)
})
and so
const data = new FormData();
data.append('usuario', 'AA');
data.append('clave', 'AA');
axios.post('https://www.personal.com.py/ApiComerciosMaven/webresources/autenticacion/', data).then(req => {
console.log('Req done: ', req)
}).catch(err => {
console.error('Error: ', err)
})
But the html request returns me the expected date but with the axios no, how could I convert that html into an axios request?
Thank you in advance