If you’re getting warnings like this

Invalid cookie header: "Set-Cookie: AWSLB=kJE6PA4PQ3wsK; Expires=Tue, 25 Jun 2019 16:59:04 GMT; Path=/". 
Invalid 'expires' attribute: Tue, 25 Jun 2019 16:59:04 GMT

then you can easily fix that. Here is how.

Apache Http Components. HttpClient

You need to change the way you create the client

RequestConfig requestConfig = RequestConfig.custom()
                                .setCookieSpec(CookieSpecs.STANDARD)
                                .build();
HttpClient httpClient = HttpClientBuilder.create()
                                .setDefaultRequestConfig(requestConfig)
                                .build();

RESTEasy. ResteasyClient

Since RESTEasy is based on Apache Http Components the approach is similar.

RequestConfig requestConfig = RequestConfig.custom()
                                .setCookieSpec(CookieSpecs.STANDARD)
                                .build();
HttpClient apacheClient = HttpClientBuilder.create()
                                .setDefaultRequestConfig(requestConfig)
                                .build();
ApacheHttpClient43Engine engine = new ApacheHttpClient43Engine(apacheClient);
ResteasyClient httpClient =  new ResteasyClientBuilder()
                                .httpEngine(engine)
                                .build();