Package io.javalin.testtools
Class HttpClient
-
- All Implemented Interfaces:
public final class HttpClient
-
-
Constructor Summary
Constructors Constructor Description HttpClient(Javalin app, OkHttpClient okHttp)
-
Method Summary
Modifier and Type Method Description final String
getOrigin()
final Unit
setOrigin(String origin)
final Javalin
getApp()
final OkHttpClient
getOkHttp()
final Response
request(Request request)
final Response
request(String path, Request.Builder builder)
final Response
request(String path, Consumer<Request.Builder> userBuilder)
final Response
get(String path, Consumer<Request.Builder> req)
final Response
get(String path)
final Response
post(String path, Object json, Consumer<Request.Builder> req)
final Response
post(String path, Object json)
final Response
post(String path)
final Response
put(String path, Object json, Consumer<Request.Builder> req)
final Response
put(String path, Object json)
final Response
put(String path)
final Response
patch(String path, Object json, Consumer<Request.Builder> req)
final Response
patch(String path, Object json)
final Response
patch(String path)
final Response
delete(String path, Object json, Consumer<Request.Builder> req)
final Response
delete(String path, Object json)
final Response
delete(String path)
-
-
Method Detail
-
getApp
final Javalin getApp()
-
getOkHttp
final OkHttpClient getOkHttp()
-
request
final Response request(Request request)
-
get
@JvmOverloads() final Response get(String path, Consumer<Request.Builder> req)
-
get
@JvmOverloads() final Response get(String path)
-
post
@JvmOverloads() final Response post(String path, Object json, Consumer<Request.Builder> req)
-
post
@JvmOverloads() final Response post(String path, Object json)
-
post
@JvmOverloads() final Response post(String path)
-
put
@JvmOverloads() final Response put(String path, Object json, Consumer<Request.Builder> req)
-
put
@JvmOverloads() final Response put(String path, Object json)
-
put
@JvmOverloads() final Response put(String path)
-
patch
@JvmOverloads() final Response patch(String path, Object json, Consumer<Request.Builder> req)
-
patch
@JvmOverloads() final Response patch(String path, Object json)
-
patch
@JvmOverloads() final Response patch(String path)
-
delete
@JvmOverloads() final Response delete(String path, Object json, Consumer<Request.Builder> req)
-
delete
@JvmOverloads() final Response delete(String path, Object json)
-
delete
@JvmOverloads() final Response delete(String path)
-
-
-
-