Class HttpTestUtils
- java.lang.Object
-
- com.atlassian.bamboo.testutils.http.HttpTestUtils
-
public class HttpTestUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
COOKIE_NAME_JSESSIONID
static String
HEADER_COOKIE
static String
HEADER_SET_COOKIE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addBasicAuth(org.apache.http.HttpRequest method)
static @NotNull org.apache.http.client.methods.HttpGet
createGetMethod(@NotNull BambooEnvironmentData environmentData, @NotNull String location)
static @NotNull org.apache.http.client.methods.HttpPost
createPostMethod(@NotNull BambooEnvironmentData environmentData, @NotNull String location)
static @NotNull String
getCookieHeaderValue(@NotNull Iterable<javax.servlet.http.Cookie> cookies)
static @NotNull String
getCookieHeaderValue(@NotNull Map<String,javax.servlet.http.Cookie> cookies)
static com.google.common.collect.Multimap<String,org.apache.http.Header>
getHeadersAsMap(org.apache.http.Header[] headers)
static @NotNull org.apache.http.impl.client.HttpClientBuilder
getHttpClient()
static @NotNull String
getUrl(@NotNull BambooEnvironmentData environmentData, @NotNull String location)
static javax.servlet.http.Cookie
seleniumToJavaXCookie(org.openqa.selenium.Cookie cookie)
-
-
-
Field Detail
-
HEADER_SET_COOKIE
public static final String HEADER_SET_COOKIE
- See Also:
- Constant Field Values
-
HEADER_COOKIE
public static final String HEADER_COOKIE
- See Also:
- Constant Field Values
-
COOKIE_NAME_JSESSIONID
public static final String COOKIE_NAME_JSESSIONID
- See Also:
- Constant Field Values
-
-
Method Detail
-
seleniumToJavaXCookie
public static javax.servlet.http.Cookie seleniumToJavaXCookie(org.openqa.selenium.Cookie cookie)
-
getCookieHeaderValue
@NotNull public static @NotNull String getCookieHeaderValue(@NotNull @NotNull Map<String,javax.servlet.http.Cookie> cookies)
-
getCookieHeaderValue
@NotNull public static @NotNull String getCookieHeaderValue(@NotNull @NotNull Iterable<javax.servlet.http.Cookie> cookies)
-
getHeadersAsMap
public static com.google.common.collect.Multimap<String,org.apache.http.Header> getHeadersAsMap(org.apache.http.Header[] headers)
-
createGetMethod
@NotNull public static @NotNull org.apache.http.client.methods.HttpGet createGetMethod(@NotNull @NotNull BambooEnvironmentData environmentData, @NotNull @NotNull String location)
-
createPostMethod
@NotNull public static @NotNull org.apache.http.client.methods.HttpPost createPostMethod(@NotNull @NotNull BambooEnvironmentData environmentData, @NotNull @NotNull String location)
-
getHttpClient
@NotNull public static @NotNull org.apache.http.impl.client.HttpClientBuilder getHttpClient()
-
getUrl
@NotNull public static @NotNull String getUrl(@NotNull @NotNull BambooEnvironmentData environmentData, @NotNull @NotNull String location)
-
addBasicAuth
public static void addBasicAuth(org.apache.http.HttpRequest method) throws org.apache.http.auth.AuthenticationException
- Throws:
org.apache.http.auth.AuthenticationException
-
-