const xhttp = new XMLHttpRequest()
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
const data = JSON.parse(this.responseText)
// handle the response that is saved in variable data
}
}
xhttp.open('GET', '/data.json', true)
xhttp.send()
Thursday, October 21, 2021
How to fetch data from server using XHR method
Subscribe to:
Post Comments (Atom)
methods available in Dapper
Dapper is a micro ORM library for .NET and .NET Core applications that allows you to execute SQL queries and map the results to objects. D...
-
AddMvcCore minimum set of services to route and invoke controller. most websites will need more configuration than this. AddAuthorization au...
-
Effect-hooks We have already used state hooks that were introduced along with React version 16.8.0 , which provide state to React compo...
-
Object Wrappers object wrappers are object-oriented code that includes other code inside for example. you can take structured code (such as ...
No comments:
Post a Comment