I can view my JSON data in my browser but not in my console. I'm not super familiar with axios, but I think the problem is with the url (see snippet below). That, or I'm missing something within axios.get {
.
Any thoughts?
server.js:
axios.get("https://handshake.[redacted].com/HandshakeWebServices/Odata/Odata.ashx/HS[redacted]?hsf=@UserName=%27[redacted]%27&$select=PreferredName,Initials,JobTitle,Office", {
crossDomain: true,
method: "GET",
credentials: "include",
mode: "no-cors",
headers: {
"Accept": "application/json; odata=verbose"
}
})
.then(function(res){
console.log(res.data);
})
.catch(function(e){
console.log(e);
})
console:
GET https://handshake.[redacted].com/HandshakeWebServices/Odata/Odata.ashx/HS[redacted]?hsf=@UserName=[redacted]&$select=PreferredName...etc 401 (Unauthorized)
server.js?1d69:18 Error: Request failed with status code 401
at createError (createError.js?2d83:16)
at settle (settle.js?467f:18)
at XMLHttpRequest.handleLoad (xhr.js?b50d:77)