Answers for "send an http request with javascript"

1

http request javascript

const requests = new XMLHTTPRequest();

requests.open('METHOD', url)
requests.send()

requests.onload = () => {
 if (requests.status == 200) {
   console.log('ok')
 } else {
 console.log('didnt work')
 }
}
Posted by: Guest on December-26-2021

Code answers related to "send an http request with javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language