Package dev.arbjerg.lavalink.client.http
Class HttpBuilder
-
- All Implemented Interfaces:
public final class HttpBuilder extends Request.BuilderUtility class assisting with making custom HTTP requests from a client.
-
-
Constructor Summary
Constructors Constructor Description HttpBuilder(Request.Builder internalBuilder)
-
Method Summary
Modifier and Type Method Description final HttpBuilderpath(String path)Set the path for this request HttpBuilderaddHeader(String name, String value)Requestbuild()HttpBuildercacheControl(CacheControl cacheControl)HttpBuilderdelete(RequestBody body)HttpBuilderget()HttpBuilderhead()HttpBuilderheader(String name, String value)HttpBuilderheaders(Headers headers)HttpBuildermethod(String method, RequestBody body)HttpBuilderpatch(RequestBody body)HttpBuilderpost(RequestBody body)HttpBuilderput(RequestBody body)HttpBuilderremoveHeader(String name)<T extends Any> HttpBuildertag(Class<in T> type, T tag)HttpBuildertag(Object tag)HttpBuilderurl(URL url)HttpBuilderurl(String url)HttpBuilderurl(HttpUrl url)-
-
Method Detail
-
path
final HttpBuilder path(String path)
Set the path for this request
- Parameters:
path- the path for the request to make, this will be prefixed with the base url of the node (E.G.- Returns:
The current builder instance, useful for chaining calls
-
addHeader
HttpBuilder addHeader(String name, String value)
-
build
Request build()
-
cacheControl
HttpBuilder cacheControl(CacheControl cacheControl)
-
delete
HttpBuilder delete(RequestBody body)
-
get
HttpBuilder get()
-
head
HttpBuilder head()
-
header
HttpBuilder header(String name, String value)
-
headers
HttpBuilder headers(Headers headers)
-
method
HttpBuilder method(String method, RequestBody body)
-
patch
HttpBuilder patch(RequestBody body)
-
post
HttpBuilder post(RequestBody body)
-
put
HttpBuilder put(RequestBody body)
-
removeHeader
HttpBuilder removeHeader(String name)
-
tag
HttpBuilder tag(Object tag)
-
url
HttpBuilder url(URL url)
-
url
HttpBuilder url(String url)
-
url
HttpBuilder url(HttpUrl url)
-
-
-
-