100-expect-continue

RestClient100-expect-continue功能通过底层的HttpClient来实现,可以分别支持 Client 级别 及 Request 级别。默认100-expect-continue为false。

Client级别100-expect-continue

Client级别的100-expect-continue将对该Client下的所有 Request 生效,具体配置方式如下:

final RestClient client = RestClient.create()
        .useExpectContinue(true)
        .build();

Request级别100-expect-continue

当Request设置了100-expect-continue,其数据将覆盖Client设置的100-expect-continue,具体配置方式如下:

final String entity = client.get("http://127.0.0.1:8081/")
        .disableExpectContinue()
        .execute()
        .toCompletableFuture()
        .get()
        .bodyToEntity(String.class);

Last modified February 22, 2022: add more docs (f7f7447)