const  {  data :  res }  =  await  this . $http. post ( "http://"  +  host +  ":9002/testPost" ,  this . function12581_12_Form) ; 
@RequestMapping ( value =  "/testPost" ,  method =  RequestMethod . POST ) 
public  String  testPost ( @RequestBody  Map < String ,  Object > )  { String  name =  ( String )  requestBody. get ( "name" ) ; String  age =  ( String )  requestBody. get ( "age" ) ; 
} 
{  "name" :  "xxx" ,  "age" :  "23"  } 
const  formData =  new  FormData ( ) ; 
formData. append ( "name" ,  this . function12581_12_Form. name) ; 
formData. append ( "age" ,  this . function12581_12_Form. age) ; const  {  data :  res }  =  await  this . $http. post ( "http://"  +  host +  ":9002/testPost" ,  formData) ; 
@RequestMapping ( value =  "/testPost" ,  method =  RequestMethod . POST ) 
public  String  testPost ( HttpServletRequest  request)  throws  IOException  { String  name =  request. getParameter ( "name" ) ; String  age =  request. getParameter ( "age" ) ; 
} 
   
 Content- Disposition:  form- data;  name= "file" ;  filename= "example.txt" 
Content- Type:  text/ plain
其中,name是该数据项的名称,filename是文件名称,如果该部分不是文件,则没有filename属性。Content-Type指定该部分的数据类型,例如text/plain表示文本数据,image/jpeg表示JPEG图片。       实际的数据,例如文本或二进制数据。         
{ "name" :  "John" , "age" :  30 , "city" :  "New York" 
} 
axios. post ( 'https://example.com/api/users' ,  { name :  'John' , age :  30 , city :  'New York' 
} ,  { headers :  { 'Content-Type' :  'application/json' } 
} ) 
const  express =  require ( 'express' ) 
const  bodyParser =  require ( 'body-parser' ) const  app =  express ( ) 
app. use ( bodyParser. json ( ) ) app. post ( '/api/users' ,  function ( req,  res )  { const  name =  req. body. nameconst  age =  req. body. ageconst  city =  req. body. city
} ) 
   
name=John&age=30&city=New%20York
axios. post ( 'https://example.com/api/users' ,  { name :  'John' , age :  30 , city :  'New York' 
} ,  { headers :  { 'Content-Type' :  'application/x-www-form-urlencoded' } 
} ) 
const  express =  require ( 'express' ) 
const  bodyParser =  require ( 'body-parser' ) const  app =  express ( ) 
app. use ( bodyParser. urlencoded ( {  extended :  false  } ) ) app. post ( '/api/users' ,  function ( req,  res )  { const  name =  req. body. nameconst  age =  req. body. ageconst  city =  req. body. city
} )