-
- All Implemented Interfaces:
public final class HttpClient
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classHttpClient.Companion
-
Constructor Summary
Constructors Constructor Description HttpClient(Javalin app, OkHttpClient okHttp)
-
Method Summary
Modifier and Type Method Description final StringgetOrigin()final UnitsetOrigin(String origin)final JavalingetApp()final OkHttpClientgetOkHttp()final Responserequest(Request request)final Responserequest(String path, Request.Builder builder)final Responserequest(String path, Consumer<Request.Builder> userBuilder)final Responseget(String path, Consumer<Request.Builder> req)final Responseget(String path)final Responsepost(String path, Object json, Consumer<Request.Builder> req)final Responsepost(String path, Object json)final Responsepost(String path)final Responseput(String path, Object json, Consumer<Request.Builder> req)final Responseput(String path, Object json)final Responseput(String path)final Responsepatch(String path, Object json, Consumer<Request.Builder> req)final Responsepatch(String path, Object json)final Responsepatch(String path)final Responsedelete(String path, Object json, Consumer<Request.Builder> req)final Responsedelete(String path, Object json)final Responsedelete(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)
-
-
-
-