I am using React.js in macOS and when I try to call axios.get, I get Network Error. I read many other cases like mine who were using React Native and the answer to them was adding settings to allow them to use http in mac instead of https, but that setting can not be used in react js.
Any advice would be appreciated.
Error: Network Error
at createError (createError.js:17)
at XMLHttpRequest.handleError (xhr.js:87)
My code is like this:
try {
const Response = await axios.get(http://xxxxx/WebServiceTest/service.svc?wsdl/GetItems, {
params: {
Number: "100",
Id: "101",
userName: "11",
credential: "Test"
}
});
console.log("http response = " + Response.data);
} catch (ex) {
console.log("error.status:", ex);
}