Http : post- Body with Text,JavaScript,XML,HTML,Multipart,PDF
HTTP -post- Body with Text,JavaScript,XML,HTML,Multipart,PDF public class postwithDifferentData { @Test public void bodywithsimpleText() { RestAssured.baseURI = "http://httpbin.org"; String BodyText = "Hello world API!!!"; given().log().all() .contentType(ContentType.TEXT) . body(BodyText) .when().log().all(). post("/post") .then().log().all() .assertThat().statusCode(200).body("data", equalTo("Hello world API!!!")); } Body with Java Script: public void bodywithsimpleJavaScript() { RestAssured.baseURI = "http://httpbin.org"; String JavaScript = "<script>\r\n" + "var x, y, z; \r\n" + "x = 5; \r\n" + "y = 6; \r\n" + "z = x + y; \r\n" + "document.getElementById(\"demo\").innerHTML =\r\n" + "\"The value of z is \" + z + \".\";\r\n" +...