Class SimpleHttp.Response
- java.lang.Object
-
- org.keycloak.broker.provider.util.SimpleHttp.Response
-
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- SimpleHttp
public static class SimpleHttp.Response extends Object implements AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description Response(org.apache.http.HttpResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNode
asJson()
<T> T
asJson(com.fasterxml.jackson.core.type.TypeReference<T> type)
<T> T
asJson(Class<T> type)
String
asString()
void
close()
org.apache.http.Header[]
getAllHeaders()
org.apache.http.entity.ContentType
getContentType()
Charset
getContentTypeCharset()
String
getFirstHeader(String name)
List<String>
getHeader(String name)
int
getStatus()
-
-
-
Method Detail
-
getStatus
public int getStatus() throws IOException
- Throws:
IOException
-
asJson
public com.fasterxml.jackson.databind.JsonNode asJson() throws IOException
- Throws:
IOException
-
asJson
public <T> T asJson(Class<T> type) throws IOException
- Throws:
IOException
-
asJson
public <T> T asJson(com.fasterxml.jackson.core.type.TypeReference<T> type) throws IOException
- Throws:
IOException
-
asString
public String asString() throws IOException
- Throws:
IOException
-
getFirstHeader
public String getFirstHeader(String name) throws IOException
- Throws:
IOException
-
getHeader
public List<String> getHeader(String name) throws IOException
- Throws:
IOException
-
getAllHeaders
public org.apache.http.Header[] getAllHeaders() throws IOException
- Throws:
IOException
-
getContentType
public org.apache.http.entity.ContentType getContentType() throws IOException
- Throws:
IOException
-
getContentTypeCharset
public Charset getContentTypeCharset() throws IOException
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
-