3

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.

1
  • Think if you use https you 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 Commented Nov 5, 2020 at 16:10

1 Answer 1

4

net::err_ssl_protocol_error may be due to the fact that you are starting a request to the URL starting with https:// Test with http://

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.