Class HttpResponseImpl
java.lang.Object
net.uiqui.embedhttp.api.impl.HttpResponseImpl
- All Implemented Interfaces:
HttpResponse
-
Constructor Summary
ConstructorsConstructorDescriptionHttpResponseImpl(int statusCode, String statusMessage) HttpResponseImpl(HttpStatusCode statusCode) -
Method Summary
Modifier and TypeMethodDescriptiongetBody()intSets the body of the response with a specific content type.setBody(ContentType contentType, String body) Sets the body of the response with a specific content type.Sets a header for the response.setHeader(HttpHeader name, String value) Sets a header for the response.
-
Constructor Details
-
HttpResponseImpl
-
HttpResponseImpl
-
-
Method Details
-
setHeader
Description copied from interface:HttpResponseSets a header for the response.- Specified by:
setHeaderin interfaceHttpResponse- Parameters:
name- the header name as an enumvalue- the header value
-
setHeader
Description copied from interface:HttpResponseSets a header for the response.- Specified by:
setHeaderin interfaceHttpResponse- Parameters:
name- the header name as a stringvalue- the header value
-
setBody
Description copied from interface:HttpResponseSets the body of the response with a specific content type.- Specified by:
setBodyin interfaceHttpResponse- Parameters:
contentType- the content typebody- the body as a string
-
setBody
Description copied from interface:HttpResponseSets the body of the response with a specific content type.- Specified by:
setBodyin interfaceHttpResponse- Parameters:
contentType- the content type as a stringbody- the body as a string
-
getStatusCode
public int getStatusCode() -
getStatusMessage
-
getHeaders
-
getBody
-