Package org.kie.server.common.rest
Interface KieServerHttpResponse
-
public interface KieServerHttpResponseInterface that exposes response related functionality of aKieServerHttpRequestinstance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringbody()BufferedInputStreambuffer()byte[]bytes()Get response as byte arrayStringcharset()Get 'charset' parameter from 'Content-Type' response headerintcode()StringcontentEncoding()Get the 'Content-Encoding' header from the responseintcontentLength()Get the 'Content-Length' header from the responseStringcontentType()Get the 'Content-Type' header from the responseStringheader(String name)Get the response headerStringheaderParameter(String headerName, String paramName)Map<String,String>headerParameters(String headerName)Map<String,List<String>>headers()String[]headers(String name)intintHeader(String name)Stringmessage()InputStreamstream()Get stream to response body
-
-
-
Method Detail
-
code
int code() throws KieServerHttpRequestException
- Throws:
KieServerHttpRequestException
-
message
String message() throws KieServerHttpRequestException
- Throws:
KieServerHttpRequestException
-
body
String body() throws KieServerHttpRequestException
- Returns:
- The content of the response
- Throws:
KieServerHttpRequestException
-
bytes
byte[] bytes() throws KieServerHttpRequestExceptionGet response as byte array- Returns:
- the content of the response in a byte array.
- Throws:
KieServerHttpRequestException
-
stream
InputStream stream() throws KieServerHttpRequestException
Get stream to response body- Returns:
- The
InputStreamcontaining the response body content - Throws:
KieServerHttpRequestException
-
buffer
BufferedInputStream buffer() throws KieServerHttpRequestException
- Throws:
KieServerHttpRequestException
-
header
String header(String name) throws KieServerHttpRequestException
Get the response header- Parameters:
name- The name of the response header- Returns:
- The value of the requested header
- Throws:
KieServerHttpRequestException
-
intHeader
int intHeader(String name) throws KieServerHttpRequestException
- Throws:
KieServerHttpRequestException
-
headers
Map<String,List<String>> headers() throws KieServerHttpRequestException
- Throws:
KieServerHttpRequestException
-
contentEncoding
String contentEncoding()
Get the 'Content-Encoding' header from the response- Returns:
- this request
-
contentType
String contentType()
Get the 'Content-Type' header from the response- Returns:
- response header value
-
contentLength
int contentLength()
Get the 'Content-Length' header from the response- Returns:
- response header value
-
charset
String charset()
Get 'charset' parameter from 'Content-Type' response header- Returns:
- charset or null if none
-
-