Package io.varhttp.test
Class HttpClient
java.lang.Object
io.varhttp.test.HttpClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpURLConnectionstatic HttpURLConnectionstatic HttpURLConnectiongetConnection(String path, String method) static HttpURLConnectionstatic HttpURLConnectionstatic HttpURLConnectionstatic HttpURLConnectionstatic HttpURLConnectionstatic HttpURLConnectionpost(String path, String body, Consumer<HttpURLConnection> consumer) static HttpURLConnectionstatic StringBufferstatic InputStreamstatic voidwithTestPemOnly(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
-