public class HttpUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DELETE |
static int |
GET |
static int |
HEAD |
static int |
OPTIONS |
static int |
POST |
static int |
PUT |
static int |
TRACE |
Constructor and Description |
---|
HttpUtils() |
Modifier and Type | Method and Description |
---|---|
static HttpMethodBase |
accessURL(URL url)
Perform a get on the indicated URL and assert an HTTP_OK response code
|
static HttpMethodBase |
accessURL(URL url,
String realm,
int expectedHttpCode)
Perform a get on the indicated URL and assert that the response code
matches the expectedHttpCode argument.
|
static HttpMethodBase |
accessURL(URL url,
String realm,
int expectedHttpCode,
Header[] hdrs) |
static HttpMethodBase |
accessURL(URL url,
String realm,
int expectedHttpCode,
Header[] hdrs,
int type) |
static HttpMethodBase |
accessURL(URL url,
String realm,
int expectedHttpCode,
int type) |
static HttpMethodBase |
createMethod(URL url,
int type) |
public static final int GET
public static final int POST
public static final int HEAD
public static final int OPTIONS
public static final int PUT
public static final int DELETE
public static final int TRACE
public static HttpMethodBase accessURL(URL url) throws Exception
url
- Exception
- on any failurepublic static HttpMethodBase accessURL(URL url, String realm, int expectedHttpCode) throws Exception
url
- expectedHttpCode
- the http response code expectedException
- on any failurepublic static HttpMethodBase accessURL(URL url, String realm, int expectedHttpCode, int type) throws Exception
Exception
public static HttpMethodBase accessURL(URL url, String realm, int expectedHttpCode, Header[] hdrs) throws Exception
Exception
public static HttpMethodBase accessURL(URL url, String realm, int expectedHttpCode, Header[] hdrs, int type) throws Exception
Exception
public static HttpMethodBase createMethod(URL url, int type)
Copyright © 2021 JBoss by Red Hat. All rights reserved.