Post Request using REST Assured

A POST request is used to send data to the server, for example, customer information, file upload, etc. using HTML forms.

public class ReqRes 

	public void setup()
		RestAssured.baseURI = "";
		RestAssured.basePath = "api";

	/*POST Request Example*/
	public void postRequestExam()
		Response res = 
			.header("Content-Type", "application/json")			
			.body("{\n" + 
					"    \"name\": \"Tarun Goswami\",\n" + 
					"    \"job\": \"QA\"\n" + 


    "name": "Tarun Goswami",
    "job": "QA",
    "id": "591",
    "createdAt": "2020-07-24T07:38:08.739Z"
Tue, 09/01/2020 - 22:50
Tarun Goswami is a highly experienced professional, currently serving as Technical Lead at a well-established IT services company. With over 12 years of experience across multiple domains, he demonstrates his expertise and passion for the industry through his engaging and informative blog writing in his spare time.