public class SimpleHttp extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleHttp.Response |
| Modifier | Constructor and Description |
|---|---|
protected |
SimpleHttp(String url,
String method,
org.apache.http.client.HttpClient client) |
| Modifier and Type | Method and Description |
|---|---|
SimpleHttp |
acceptJson() |
com.fasterxml.jackson.databind.JsonNode |
asJson() |
<T> T |
asJson(Class<T> type) |
<T> T |
asJson(com.fasterxml.jackson.core.type.TypeReference<T> type) |
SimpleHttp.Response |
asResponse() |
int |
asStatus() |
String |
asString() |
SimpleHttp |
auth(String token) |
static SimpleHttp |
doGet(String url,
org.apache.http.client.HttpClient client) |
static SimpleHttp |
doGet(String url,
KeycloakSession session) |
static SimpleHttp |
doPost(String url,
org.apache.http.client.HttpClient client) |
static SimpleHttp |
doPost(String url,
KeycloakSession session) |
SimpleHttp |
header(String name,
String value) |
SimpleHttp |
json(Object entity) |
SimpleHttp |
param(String name,
String value) |
public static SimpleHttp doGet(String url, KeycloakSession session)
public static SimpleHttp doGet(String url, org.apache.http.client.HttpClient client)
public static SimpleHttp doPost(String url, KeycloakSession session)
public static SimpleHttp doPost(String url, org.apache.http.client.HttpClient client)
public SimpleHttp header(String name, String value)
public SimpleHttp json(Object entity)
public SimpleHttp param(String name, String value)
public SimpleHttp auth(String token)
public SimpleHttp acceptJson()
public com.fasterxml.jackson.databind.JsonNode asJson()
throws IOException
IOExceptionpublic <T> T asJson(Class<T> type) throws IOException
IOExceptionpublic <T> T asJson(com.fasterxml.jackson.core.type.TypeReference<T> type)
throws IOException
IOExceptionpublic String asString() throws IOException
IOExceptionpublic int asStatus()
throws IOException
IOExceptionpublic SimpleHttp.Response asResponse() throws IOException
IOExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.