接口 ResponseEntity.BodyBuilder
- 所有已知实现类:
ResponseEntity.DefaultBuilder
- 封闭类:
- ResponseEntity<T>
public static interface ResponseEntity.BodyBuilder
extends ResponseEntity.HeadersBuilder<ResponseEntity.BodyBuilder>
Defines a builder that adds a body to the response entity.
-
方法概要
修饰符和类型方法说明<T> ResponseEntity<T>body(T body) Set the body of the response entity and returns it.contentLength(long contentLength) Set the length of the body in bytes, as specified by theContent-Lengthheader.contentType(MediaType contentType) Set the media type of the body, as specified by theContent-Typeheader.从接口继承的方法 cn.taketoday.http.ResponseEntity.HeadersBuilder
allow, build, cacheControl, eTag, header, headers, headers, lastModified, lastModified, lastModified, location, varyBy
-
方法详细资料
-
contentLength
Set the length of the body in bytes, as specified by theContent-Lengthheader.- 参数:
contentLength- the content length- 返回:
- this builder
- 另请参阅:
-
contentType
Set the media type of the body, as specified by theContent-Typeheader.- 参数:
contentType- the content type- 返回:
- this builder
- 另请参阅:
-
body
Set the body of the response entity and returns it.- 类型参数:
T- the type of the body- 参数:
body- the body of the response entity- 返回:
- the built response entity
-