Interface HttpResponse
- All Superinterfaces:
HttpMessage<HttpResponse>
- All Known Implementing Classes:
NettyHttpServerResponse
Represents a response http message transferred from a server to a client.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionstatus()The status code of the http response.status(@NonNull HttpResponseCode code) Sets the status of this response.Methods inherited from interface eu.cloudnetservice.driver.network.http.HttpMessage
body, body, body, body, bodyAsString, bodyStream, clearHeaders, context, hasBody, hasHeader, header, header, headerAsBoolean, headerAsInt, headers, removeHeader, version, version
-
Method Details
-
status
The status code of the http response. The response status code set here should, but must not be a valid one. See the mdn documentation about status codes for more information.- Returns:
- the http response code of this response.
-
status
Sets the status of this response.- Parameters:
code- the new response status.- Returns:
- the same instance as used to call the method, for chaining.
- Throws:
NullPointerException- if the given response code is null.
-