| java.lang.Object org.jboss.test.util.web.HttpUtils
HttpUtils | public class HttpUtils (Code) | | Utilities for client http requests
author: Scott.Stark@jboss.org version: $Revision: 57211 $ |
Field Summary | |
final public static int | DELETE | final public static int | GET | final public static int | HEAD | final public static int | OPTIONS | final public static int | POST | final public static int | PUT | final public static int | TRACE |
Method Summary | |
public static HttpMethodBase | accessURL(URL url) | public 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. | public static HttpMethodBase | accessURL(URL url, String realm, int expectedHttpCode, int type) | public static HttpMethodBase | accessURL(URL url, String realm, int expectedHttpCode, Header[] hdrs) | public static HttpMethodBase | accessURL(URL url, String realm, int expectedHttpCode, Header[] hdrs, int type) | public static HttpMethodBase | createMethod(URL url, int type) | public static String | getBaseURL() | public static String | getBaseURL(String username, String password) | public static String | getBaseURLNoAuth() |
DELETE | final public static int DELETE(Code) | | |
GET | final public static int GET(Code) | | |
HEAD | final public static int HEAD(Code) | | |
OPTIONS | final public static int OPTIONS(Code) | | |
POST | final public static int POST(Code) | | |
PUT | final public static int PUT(Code) | | |
TRACE | final public static int TRACE(Code) | | |
accessURL | public static HttpMethodBase accessURL(URL url) throws Exception(Code) | | Perform a get on the indicated URL and assert an HTTP_OK response code
Parameters: url - The commons HttpClient used to perform the get throws: Exception - on any failure |
accessURL | public static HttpMethodBase accessURL(URL url, String realm, int expectedHttpCode) throws Exception(Code) | | Perform a get on the indicated URL and assert that the response code
matches the expectedHttpCode argument.
Parameters: url - Parameters: expectedHttpCode - the http response code expected The commons HttpClient used to perform the get throws: Exception - on any failure |
accessURL | public static HttpMethodBase accessURL(URL url, String realm, int expectedHttpCode, int type) throws Exception(Code) | | |
accessURL | public static HttpMethodBase accessURL(URL url, String realm, int expectedHttpCode, Header[] hdrs) throws Exception(Code) | | |
accessURL | public static HttpMethodBase accessURL(URL url, String realm, int expectedHttpCode, Header[] hdrs, int type) throws Exception(Code) | | |
createMethod | public static HttpMethodBase createMethod(URL url, int type)(Code) | | |
getBaseURLNoAuth | public static String getBaseURLNoAuth()(Code) | | |
|
|