Answer the question
In order to leave comments, you need to log in
What library to use for REST requests in JS?
It is necessary to send requests from the client in the browser to the API on the server. You can use fetch or axios - but it's more like RPC. There should be a convenient library for configuring API requests.
Answer the question
In order to leave comments, you need to log in
Good day!
Requests from the browser to the api on the server are called Ajax requests. In some sense it can be called RPC.
To make such requests, there are axios libraries, part of the jQuery library, and probably something else.
fetch is a modern web api for working with Ajax requests, so it's worth learning this tool and using it where compatibility with older browsers is not very important.
If compatibility is important, use axios.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question