接口 RenderingResponse.ViewBuilder

所有已知实现类:
ModelAndViewRenderingResponseBuilder
封闭接口:
RenderingResponse

public static interface RenderingResponse.ViewBuilder
Defines a builder for RenderingResponse.
  • 方法详细资料

    • header

      RenderingResponse.ViewBuilder header(String headerName, String... headerValues)
      Add the given header value(s) under the given name.
      参数:
      headerName - the header name
      headerValues - the header value(s)
      返回:
      this builder
      另请参阅:
    • headers

      Manipulate this response's headers with the given consumer. The headers provided to the consumer are "live", so that the consumer can be used to overwrite existing header values, remove values, or use any of the other HttpHeaders methods.
      参数:
      headersConsumer - a function that consumes the HttpHeaders
      返回:
      this builder
    • status

      Set the HTTP status.
      参数:
      status - the response status
      返回:
      this builder
    • status

      RenderingResponse.ViewBuilder status(int status)
      Set the HTTP status.
      参数:
      status - the response status
      返回:
      this builder
    • cookie

      Add the given cookie to the response.
      参数:
      cookie - the cookie to add
      返回:
      this builder
    • cookies

      RenderingResponse.ViewBuilder cookies(Consumer<cn.taketoday.util.MultiValueMap<String,HttpCookie>> cookiesConsumer)
      Manipulate this response's cookies with the given consumer. The cookies provided to the consumer are "live", so that the consumer can be used to overwrite existing cookies, remove cookies, or use any of the other MultiValueMap methods.
      参数:
      cookiesConsumer - a function that consumes the cookies
      返回:
      this builder
    • build

      Build the response.
      返回:
      the built response