Post empty body with Jersey 2 client
I can’t find this in the doc’s anywhere, but I believe you can use null to get an empty body: final MyClass result = ClientBuilder.newClient() .target(“http://localhost:8080”) .path(“path”) .queryParam(“key”, “value”) .request(APPLICATION_JSON) .post(Entity.json(null), MyClass.class)