LiquidBounce
Toggle table of contents
0.37.0
jvm
Target filter
jvm
Switch theme
Search in API
Skip to content
LiquidBounce
LiquidBounce
/
net.ccbluex.liquidbounce.api.core
/
HttpClient
Http
Client
object
HttpClient
Members
Types
Media
Types
Link copied to clipboard
object
MediaTypes
Properties
client
Link copied to clipboard
@get:
JvmStatic
val
client
:
OkHttpClient
API client
DEFAULT_
AGENT
Link copied to clipboard
@
JvmField
val
DEFAULT_AGENT
:
String
EMPTY_
HEADERS
Link copied to clipboard
@
JvmField
val
EMPTY_HEADERS
:
Headers
Unfortunately, Lunar Client uses OkHttp 4.12.0 which does not have
Headers.EMPTY
Functions
download
Link copied to clipboard
suspend
fun
download
(
url
:
String
,
file
:
File
,
agent
:
String
=
DEFAULT_AGENT
,
progressListener
:
OkHttpProgressInterceptor.ProgressListener
?
=
null
)
:
Long
request
Link copied to clipboard
suspend
fun
request
(
url
:
String
,
method
:
HttpMethod
,
agent
:
String
=
DEFAULT_AGENT
,
headers
:
Headers.Builder
.
(
)
->
Unit
=
{}
,
body
:
RequestBody
?
=
null
,
progressListener
:
OkHttpProgressInterceptor.ProgressListener
?
=
null
)
:
Response
send
Async
Link copied to clipboard
@
JvmStatic
fun
Call
.
sendAsync
(
)
:
CompletableFuture
<
Response
>