22 lines
		
	
	
		
			772 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			772 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ---
 | |
| title: Get Data from POST Requests
 | |
| ---
 | |
| ## Get Data from POST Requests
 | |
| 
 | |
| 
 | |
| <!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds  -->
 | |
| 
 | |
| Just like using req.query we can do req.body to get our data. This challenge is very similar to "Get Query Parameter Input from the Client."
 | |
| 
 | |
| In order to get data from a post request a general format is:
 | |
| 
 | |
| ```javascript
 | |
| app.post(PATH, function(req, res) {
 | |
|   // Handle the data in the request
 | |
| });
 | |
| ```
 | |
| 
 | |
| 
 | |
| 
 | |
| <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/apis-and-microservices/basic-node-and-express/use-body-parser-to-parse-post-requests/index.md' target='_blank' rel='nofollow'>Help our community expand these hints and guides</a>.
 |