1

I used Jersey Client in the project like this:

clientConfig.connectorProvider(new ApacheConnectorProvider());
clientConfig.register(MultiPartFeature.class);
client = ClientBuilder.newClient(clientConfig);

it actually use httpClient to do the job. but now I encountered the CookieSpec issue in this question: Fixing HttpClient warning “Invalid expires attribute” using fluent API. I need to change the CookieSpec but I cannot find where to change the config.

Ted.You
  • 13
  • 2

1 Answers1

1

Maybe you can try to use the below solution:

RequestConfig requestConfig = RequestConfig.custom()
                .setCookieSpec(CookieSpecs.STANDARD).build();
        clientConfig.property(ApacheClientProperties.REQUEST_CONFIG, requestConfig);
kaison
  • 26
  • 1