{"data":{"email":"
[email protected]","password":"password"}}
How to pass this data in request body.
softassert= new SoftAssert();
RestAssured.baseURI = "http://10.0.0.156:5001/master";
RequestSpecification httpRequest = RestAssured.given();
httpRequest.header("Content-Type", "application/json");
//JSONObject requestParams = new JSONObject();
Map<String, Object> data = new HashMap<String, Object>();
//Map<String, Object> details = new HashMap<>();
data.put("email", "
[email protected]");
data.put("password", "password");
httpRequest.body(data.toString());
Response response = httpRequest.post("/loginUser");