I've get request in reactJs to Node.js server given below
const response =
await axios.get("http://xx.xx.xx.x:3002/api/products/allTimers/",
{
headers: { 'Authorization': 'Bearer ' + this.state.authorization_token }
}
)
and the console is given by
xhr.js:178 GET https://xx.xx.xx.x:3002/api/products/allTimers net::ERR_SSL_PROTOCOL_ERROR
dispatchXhrRequest @ xhr.js:178
createError.js:16 Uncaught (in promise) Error: Network Error
at createError (createError.js:16)
at XMLHttpRequest.handleError (xhr.js:83)
how to solve this issue.
httpsyou need to provide additional credentials to the server. However, you are using http:// in your GET request so that does seem strange it would ask for that