'How I can bring up results from postman to eclipse in console
So, I was trying to bring up this result from postman :
{
"username": "kentak2un",
"email": "[email protected]",
"phonenumber": "080989898989",
"kolakCount": 13,
"rujakCount": 0,
"cendolCount": 0
}
I want to extract the key and bring up to eclipse and show it on my console.
Meanwhile, my code in eclipse :
@Test
public void getStatus() {
RestAssured.baseURI = "https://kolakproject.herokuapp.com";
String PayLoad = "{}";
System.out.println(token);
Response response = RestAssured.given().contentType("application/json").body(PayLoad).when().post("/me/status");
ResponseBody body = response.getBody();
System.out.println(body);
assertEquals(200, body);
}
So, any suggestion to make my code works? Thank you.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
