Answer the question
In order to leave comments, you need to log in
How to make an ajax request from React to a local OpenServer?
Hello. Please tell me how to make a request from a React application.
I have a simple application created with create react app.
I wrote the simplest server in pure php, and made requests to it from a regular site (in the same OpenServer)
But how to make a request from React to OpenServer?
I found in Google that there are fake api packages for react, for example express or json-server, but they are still too tricky for me.
Answer the question
In order to leave comments, you need to log in
A local server is no different from an external one. Just enter his address. Set up CORS in your API
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question