我想使用矩陣參數執行GET請求。 http://localhost:8080/car/bmw;color=red使用矩陣參數執行獲取請求?
有媒體鏈接這個問題的回答Creating a GET request with matrix parameters ,但沒有真正的一步一步的解釋存在。
我想使用矩陣參數執行GET請求。 http://localhost:8080/car/bmw;color=red使用矩陣參數執行獲取請求?
有媒體鏈接這個問題的回答Creating a GET request with matrix parameters ,但沒有真正的一步一步的解釋存在。
此外,你可以做到這一點,仍然使用休息放心。
given()。urlEncodingEnabled(false).when()。 get(「http://localhost:8080/car/bmw;color=red」)
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();
那麼你有什麼特別的麻煩? – chrylis
我找不到任何關於如何實際構建請求然後接收JSON數據的可理解信息。 – Karudi