i'm invoking authentication service via javascript fetch access token. service simple restful call. can see call successful using fiddler (with 200 response , json data). fetch response never seems invoked. below snippet:
const authbody = `grant_type=password&username=${username}&password=${password}&scope=roles offline_access profile` const authheader = new headers({'content-type': 'application/x-www-form-urlencoded'}) const config = { method: 'post', headers: authheader, body: authbody } fetch('http://localhost:23461/connect/token', config).then(function(response) { console.log('response = ' + response) return response.json() }).then(function(json) { console.log('json data = ' + json) return json }).catch(function(error) { console.log('error = ' + error) })
when executing fetch above none of console.logs gets executed... seems hang. fiddler tells otherwise. ideas?
Comments
Post a Comment