cors-login
JavaScript
const options = {
method: 'POST',
body: {username: 'admin', password: 'P@ssword123'},
// mode: 'no-cors', // TODO: uncomment this if you want successfully resolve promise
headers: {
'Cache-Control': 'no-cache'
}
}
fetch('http://nextlink-dev.azurewebsites.net/api/accounts/session', options)
.then(data => console.error('data', data))
.catch(error => console.error('Error: ', error))