Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

axios send post to php code example

Example 1: axios send post to php

var params = new URLSearchParams();
params.append('param1', 'value1');
params.append('param2', 'value2');
axios.post('/foo', params);

Example 2: send axios request to php

<?php  
  $rp = json_decode(file_get_contents('php://input'), true);

Example 3: axios post php

// JS
axios.post(url, JSON.stringify({
name: "this.name",
email: "this.psswrd"
}))
  
// PHP
$_POST = json_decode(array_keys($_POST)[0], true);

Tags:

Php Example

Related

generate numbers between range java code example php access array element by index code example iterate in python code example vector c++ erase at index code example electron make exe code example what does bundle exec do in heroku.yml code example textfield width 100% material ui code example how to join queries in sql code example install entire npm code example js change video src code example what is latex document code example what meta charset= utf-8 code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy