public class HttpClientUtil extends Object
| Constructor and Description |
|---|
HttpClientUtil() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.http.HttpResponse |
executeRequest(String url,
io.netty.handler.codec.http.HttpMethod method) |
static org.apache.http.HttpResponse |
executeRequestWithPayload(String uri,
int port,
io.netty.handler.codec.http.HttpMethod method,
String payload) |
static org.apache.http.client.HttpClient |
getHttpClient() |
static boolean |
isServerStarted(int port) |
static org.json.JSONObject |
parseJsonResponse(org.apache.http.HttpResponse response) |
static void |
waitForServer(int port,
long timeout,
TimeUnit timeoutUnit) |
public static org.apache.http.client.HttpClient getHttpClient()
public static org.apache.http.HttpResponse executeRequestWithPayload(String uri, int port, io.netty.handler.codec.http.HttpMethod method, String payload) throws Exception
Exceptionpublic static org.json.JSONObject parseJsonResponse(org.apache.http.HttpResponse response)
throws Exception
Exceptionpublic static org.apache.http.HttpResponse executeRequest(String url, io.netty.handler.codec.http.HttpMethod method) throws Exception
Exceptionpublic static boolean isServerStarted(int port)
public static void waitForServer(int port,
long timeout,
TimeUnit timeoutUnit)
Copyright © 2015. All rights reserved.