I have a request that looks like this :
http://localhost:8080/car/bmw;color=red
that returns the model of car and it's color as json data. If I do the request without specifying color it will default to color green.
And the Java code:
String resourcePath = "http://localhost:8080/"
String carModel= "bmw"
String color = "red"
RestAssuredResponseImpl response =
(RestAssuredResponseImpl) given().
when().get(resourcePath + "car/" + carModel + ";color=" + color );
When I copy/paste the url into browser it returns the json as expected , but when I try to get it with rest-assured I get a 404 not found error. I've tried sending the request with param("color",color) but it just ignores the parameters and returns the default json.