sheaivey / react-axios

Axios Components for React with child function callback
MIT License
180 stars 20 forks source link

Request sends local port number in url #20

Closed brytorres closed 7 years ago

brytorres commented 7 years ago

I'm developing an app using create-react-app and have been having some issues sending a request. It creates a hot reload local server using port 3000. (localhost:3000)

I keep getting this error:

Something bad happened: Request failed with status code 404

When I looked at the console, I noticed that the request was sent using my localhost port number in front of the desired url. This is the console error:

Failed to load resource: the server responded with a status of 404 (Not Found) :3000/api.coinmarketcap.com/v1/ticker/

How can I remove the 3000 from the request?

sheaivey commented 7 years ago

This appears to be an issue of not supplying http:// or https:// to the url prop. Without seeing more of your code it could be coming from anywhere.

I don't believe this is any issue with react-axios or axios but more an implementation issue.