0
votes

I want to perform a GET request using matrix parameters. http://localhost:8080/car/bmw;color=red

There is allready this question answered Creating a GET request with matrix parameters ,but there is not real step by step explanation there.

2
So what specifically are you having trouble with? - chrylis -cautiouslyoptimistic-
I can't find any understandable information on how to actually build the request and then receive the JSON data. - Karudi

2 Answers

2
votes

Also you can do it easier still using rest-assured.

given().urlEncodingEnabled(false).when(). get("http://localhost:8080/car/bmw;color=red")

0
votes
  ResteasyClient client = new ResteasyClientBuilder().build();
            ResteasyWebTarget target = client.target("http://localhost:8080/car/bmw;color=red");
            Response response = target.request().get();
            String value = response.readEntity(String.class);
            System.out.println(value);
            response.close();