Open PeterYuHautelook opened 5 years ago
The issue is with the example endpoint. Go to jsonip.com/endpoint1 yourself and you'll see that it doesn't return a valid json. I'll fix the example though as there are a couple of things wrong with it and it's a tiny change.
.Given() //Optional, set the name of this suite .Name("JsonIP Test Suite") //Optional, set the header parameters.
//Defaults will be set to application/json if none is given .Header("Content-Type", "application/json") .Header("Accept-Encoding", "gzip,deflate") .Host("jsonip.com") .Uri("/endpoint1");
is not compiling and giving me error System.Exception : (application/json; charset=utf-8) not supported
Same for the below modified code from example: var endpoint1 = new RestAssured() .Given() //Optional, set the name of this suite .Name("JsonIP Test Suite") //Optional, set the header parameters.
//Defaults will be set to application/json if none is given .Header("Content-Type", "application/json") .Header("Accept-Encoding", "gzip,deflate") .Host("jsonip.com") .Uri("/endpoint1");