接口 ClientHttpRequestExecution

  • 函数接口:
    这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

    @FunctionalInterface
    public interface ClientHttpRequestExecution
    Represents the context of a client-side HTTP request execution.

    Used to invoke the next interceptor in the interceptor chain, or - if the calling interceptor is last - execute the request itself.

    从以下版本开始:
    3.1
    作者:
    Arjen Poutsma
    另请参阅:
    ClientHttpRequestInterceptor
    • 方法详细资料

      • execute

        ClientHttpResponse execute​(HttpRequest request,
                                   byte[] body)
                            throws IOException
        Execute the request with the given request attributes and body, and return the response.
        参数:
        request - the request, containing method, URI, and headers
        body - the body of the request to execute
        返回:
        the response
        抛出:
        IOException - in case of I/O errors