+ 4
Sending POST request using Javascript
How to send a post request using javascript??
8 Respostas
+ 4
Use axios.js
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
axios.post('https://api.../user', {
firstName: 'Fred',
lastName: 'Flintstone'
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
</script>
+ 4
You can use regular fetch Api. Or you can use Ajax or Jquery. There are plenty of ways to do this.
+ 3
Thanks Calviղ
+ 2
🇮🇳Vivek🇮🇳 can u give some examples?
+ 2
Vladyslav Semeniuk 🐸 Fullstack??
Where is that title?
+ 1
Vladyslav Semeniuk 🐸 im still learning lol
- 1
Gyan Prakash Singh Jaruhar fullstack?? Are You sure about that title with that question?)
- 1
Gyan Prakash Singh Jaruhar in your profile maybe?lol