Package io.varhttp.test
Class HttpClient
java.lang.Object
io.varhttp.test.HttpClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpURLConnection
static HttpURLConnection
static HttpURLConnection
getConnection
(String path, String method) static HttpURLConnection
static HttpURLConnection
static HttpURLConnection
static HttpURLConnection
static HttpURLConnection
static HttpURLConnection
post
(String path, String body, Consumer<HttpURLConnection> consumer) static HttpURLConnection
static StringBuffer
static InputStream
static void
withTestPemOnly
(org.junit.function.ThrowingRunnable withHttpClient)
-
Constructor Details
-
HttpClient
public HttpClient()
-
-
Method Details
-
readDownloadableContent
- Throws:
IOException
-
readContent
- Throws:
IOException
-
get
- Throws:
IOException
-
withTestPemOnly
public static void withTestPemOnly(org.junit.function.ThrowingRunnable withHttpClient) throws Throwable - Throws:
Throwable
-
post
-
post
-
post
-
post
public static HttpURLConnection post(String path, String body, Consumer<HttpURLConnection> consumer) -
readHeaders
-
head
- Throws:
IOException
-
options
- Throws:
IOException
-
getConnection
- Throws:
IOException
-
delete
- Throws:
IOException
-
put
- Throws:
IOException
-