Jersey 2 클라이언트가있는 빈 몸체로 게시물 요청을 제출하려면 어떻게해야합니까?Jersey 2 클라이언트가있는 빈 본체 게시
final MyClass result = ClientBuilder.newClient()
.target("http://localhost:8080")
.path("path")
.queryParam("key", "value")
.request(APPLICATION_JSON)
.post(What to fill in here if the body should be left empty??, MyClass.class);
는
업데이트 :이 작동합니다
final MyClass result = ClientBuilder
.newBuilder().register(JacksonFeature).build()
.target("http://localhost:8080")
.path("path")
.queryParam("key", "value")
.request(APPLICATION_JSON)
.post(null, MyClass.class);
나는 파티에 늦게 해요,하지만 FWIW는 업데이트 내 특정 문제에 대한 답변입니다 - 특별히 내가 그 시도하지만'MessageBodyProviderNotFoundException있어 콘텐츠-Type 헤더 : –