Fixing HttpClient warning “Invalid expires attribute” using fluent API

前端 未结 4 747
面向向阳花
面向向阳花 2020-12-28 12:53

I\'m using the fluent API of HttpClient to make a GET request:

String jsonResult = Request.Get(requestUrl)
            .connectTimeout(2000)
            .soc         


        
4条回答
  •  南笙
    南笙 (楼主)
    2020-12-28 13:27

    If you want to use HttpClientBuilder you can use the following sytax:

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

提交回复
热议问题