Here are two commonly used ways to make a GET request in JavaScript:
index.tsx235 chars9 lines
index.tsx146 chars5 lines
Both of these methods are used to make asynchronous requests and receive responses from servers. The XMLHttpRequest offers more fine-grained control over the request and the response, whereas the Fetch API offers simpler syntax and automatically handles json responses.
gistlibby LogSnag