Description
I have following code:
endpoint:
@Path("/") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public interface MyApi { @Path("invoices/{number}/bookkeep") @PUT String bookkeep(@PathParam("number") String invoiceNumber); ... }
client configuration:
JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean(); bean.setAddress("http://localhost"); bean.setInheritHeaders(true); bean.setThreadSafe(true); bean.setServiceClass(MyApi.class); MyApi myApi = bean.create(MyApi.class);
When I run
myApi.bookkeep("111");
Result:
Http-Method: PUT Content-Type: Headers: {Access-Token=[aaa], Accept=[application/json]}
Expected:
... Content-Type: application/json ...
With cxf-rt-rs-client version 3.0.3 Content-Type is application/json.
With cxf-rt-rs-client version 3.1.4 Content-Type is empty.