Package io.servicetalk.http.api
Interface HttpResponseMetaData
-
- All Superinterfaces:
HttpMetaData
- All Known Subinterfaces:
BlockingStreamingHttpResponse,HttpResponse,StreamingHttpResponse
- All Known Implementing Classes:
BlockingStreamingHttpServerResponse
public interface HttpResponseMetaData extends HttpMetaData
Meta data associated with an HTTP response. This includes pieces form the status line and other meta data fromHttpMetaData.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default HttpResponseMetaDataaddCookie(HttpCookiePair cookie)Adds a cookie.default HttpResponseMetaDataaddCookie(java.lang.CharSequence name, java.lang.CharSequence value)default HttpResponseMetaDataaddHeader(java.lang.CharSequence name, java.lang.CharSequence value)Adds a new header with the specifiednameandvalue.default HttpResponseMetaDataaddHeaders(HttpHeaders headers)Adds all header names and values ofheadersobject.default HttpResponseMetaDataaddSetCookie(HttpSetCookie cookie)Adds a set-cookie.default HttpResponseMetaDataaddSetCookie(java.lang.CharSequence name, java.lang.CharSequence value)default HttpResponseMetaDatasetHeader(java.lang.CharSequence name, java.lang.CharSequence value)Sets a header with the specifiednameandvalue.default HttpResponseMetaDatasetHeaders(HttpHeaders headers)Clears the current header entries and copies all header entries of the specifiedheadersobject.HttpResponseStatusstatus()Returns the status of thisStreamingHttpResponse.HttpResponseMetaDatastatus(HttpResponseStatus status)Set the status of thisStreamingHttpResponse.HttpResponseMetaDataversion(HttpProtocolVersion version)Set the protocol version of thisHttpMetaData.
-
-
-
Method Detail
-
status
HttpResponseStatus status()
Returns the status of thisStreamingHttpResponse.- Returns:
- The
HttpResponseStatusof thisStreamingHttpResponse
-
status
HttpResponseMetaData status(HttpResponseStatus status)
Set the status of thisStreamingHttpResponse.- Parameters:
status- TheHttpResponseStatusto set.- Returns:
this.
-
version
HttpResponseMetaData version(HttpProtocolVersion version)
Description copied from interface:HttpMetaDataSet the protocol version of thisHttpMetaData.- Specified by:
versionin interfaceHttpMetaData- Parameters:
version- the protocol version to set.- Returns:
this.
-
addHeader
default HttpResponseMetaData addHeader(java.lang.CharSequence name, java.lang.CharSequence value)
Description copied from interface:HttpMetaDataAdds a new header with the specifiednameandvalue.- Specified by:
addHeaderin interfaceHttpMetaData- Parameters:
name- the name of the header.value- the value of the header.- Returns:
this.
-
addHeaders
default HttpResponseMetaData addHeaders(HttpHeaders headers)
Description copied from interface:HttpMetaDataAdds all header names and values ofheadersobject.- Specified by:
addHeadersin interfaceHttpMetaData- Parameters:
headers- the headers to add.- Returns:
this.
-
setHeader
default HttpResponseMetaData setHeader(java.lang.CharSequence name, java.lang.CharSequence value)
Description copied from interface:HttpMetaDataSets a header with the specifiednameandvalue. Any existing headers with the same name are overwritten.- Specified by:
setHeaderin interfaceHttpMetaData- Parameters:
name- the name of the header.value- the value of the header.- Returns:
this.
-
setHeaders
default HttpResponseMetaData setHeaders(HttpHeaders headers)
Description copied from interface:HttpMetaDataClears the current header entries and copies all header entries of the specifiedheadersobject.- Specified by:
setHeadersin interfaceHttpMetaData- Parameters:
headers- the headers object which contains new values.- Returns:
this.
-
addCookie
default HttpResponseMetaData addCookie(HttpCookiePair cookie)
Description copied from interface:HttpMetaDataAdds a cookie.This may result in multiple
HttpCookiePairs with same name.- Specified by:
addCookiein interfaceHttpMetaData- Parameters:
cookie- the cookie to add.- Returns:
this.
-
addCookie
default HttpResponseMetaData addCookie(java.lang.CharSequence name, java.lang.CharSequence value)
Description copied from interface:HttpMetaDataAdds a cookie with the specifiednameandvalue.This may result in multiple
HttpSetCookies with same name. Added cookie will not be wrapped, not secure, and not HTTP-only, with no path, domain, expire date and maximum age.- Specified by:
addCookiein interfaceHttpMetaData- Parameters:
name- the name of the cookie.value- the value of the cookie.- Returns:
this.
-
addSetCookie
default HttpResponseMetaData addSetCookie(HttpSetCookie cookie)
Description copied from interface:HttpMetaDataAdds a set-cookie.This may result in multiple
HttpSetCookies with same name.- Specified by:
addSetCookiein interfaceHttpMetaData- Parameters:
cookie- the cookie to add.- Returns:
this.
-
addSetCookie
default HttpResponseMetaData addSetCookie(java.lang.CharSequence name, java.lang.CharSequence value)
Description copied from interface:HttpMetaDataAdds a set-cookie with the specifiednameandvalue.This may result in multiple
HttpSetCookies with same name. Added cookie will not be wrapped, not secure, and not HTTP-only, with no path, domain, expire date and maximum age.- Specified by:
addSetCookiein interfaceHttpMetaData- Parameters:
name- the name of the cookie.value- the value of the cookie.- Returns:
this.
-
-