CustomHttpRequestBuilder
class CustomHttpRequestBuilder(method: HttpMethod, other: HttpRequest.Builder = newBuilder().method(method.name, noBody())) : HttpRequest.Builder
A class that builds HTTP requests with custom features like query parameters and authorization.
Constructors
Link copied to clipboard
constructor(method: HttpMethod, other: HttpRequest.Builder = newBuilder().method(method.name, noBody()))
Functions
Link copied to clipboard
Adds an authorization to the HTTP request.
Link copied to clipboard
Sets the body of the HTTP request as a ByteArray.
Link copied to clipboard
Sets the Content-Type of the HTTP request.
Link copied to clipboard
Link copied to clipboard
Sets the body of the HTTP request as a Flow
Link copied to clipboard
fun publisherBody(body: Flow.Publisher<ByteBuffer>, contentLength: Long? = null): HttpRequest.Builder
Sets the body of the HTTP request as a Publisher
Link copied to clipboard
Adds a query parameter with multiple values.
Adds a query parameter with a single value.
Adds a query parameter with a list of values.
Link copied to clipboard
Adds multiple headers and overrides the old values
Link copied to clipboard
Set a query parameter with a list of values.
Link copied to clipboard
Sets the body of the HTTP request as a String.