+ 4

Sending POST request using Javascript

How to send a post request using javascript??

21st Jul 2020, 11:13 AM
Gyan Prakash Singh Jaruhar
Gyan Prakash Singh Jaruhar - avatar
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>
21st Jul 2020, 12:02 PM
Calviղ
Calviղ - avatar
+ 4
You can use regular fetch Api. Or you can use Ajax or Jquery. There are plenty of ways to do this.
21st Jul 2020, 11:28 AM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar
+ 3
Thanks Calviղ
21st Jul 2020, 12:03 PM
Gyan Prakash Singh Jaruhar
Gyan Prakash Singh Jaruhar - avatar
+ 2
🇮🇳Vivek🇮🇳 can u give some examples?
21st Jul 2020, 11:36 AM
Gyan Prakash Singh Jaruhar
Gyan Prakash Singh Jaruhar - avatar
+ 2
Vladyslav Semeniuk 🐸 Fullstack?? Where is that title?
21st Jul 2020, 2:45 PM
Gyan Prakash Singh Jaruhar
Gyan Prakash Singh Jaruhar - avatar
+ 1
Vladyslav Semeniuk 🐸 im still learning lol
22nd Jul 2020, 3:23 AM
Gyan Prakash Singh Jaruhar
Gyan Prakash Singh Jaruhar - avatar
- 1
Gyan Prakash Singh Jaruhar fullstack?? Are You sure about that title with that question?)
21st Jul 2020, 2:09 PM
Vladyslav Semeniuk 🐸
Vladyslav Semeniuk 🐸 - avatar
- 1
Gyan Prakash Singh Jaruhar in your profile maybe?lol
21st Jul 2020, 6:04 PM
Vladyslav Semeniuk 🐸
Vladyslav Semeniuk 🐸 - avatar