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.JsonNodeasJson()<T> TasJson(com.fasterxml.jackson.core.type.TypeReference<T> type)<T> TasJson(Class<T> type)StringasString()voidclose()StringgetFirstHeader(String name)List<String>getHeader(String name)intgetStatus()
-
-
-
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
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
-