Http

open class Http

Http Utilities

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
Link copied to clipboard
Utility to build MultiPart requests
Link copied to clipboard
open class QueryBuilder
QueryString Builder
Link copied to clipboard
open class Request : Closeable
Request Builder
Link copied to clipboard
open class Response : Closeable
Response obtained by calling Request.

Functions

Link copied to clipboard
open fun simpleDownload(url: String, outputFile: File)
Download content from the specified url to the specified File
Link copied to clipboard
open fun simpleGet(url: String): String
Send a simple GET request
Link copied to clipboard
open fun <T> simpleJsonGet(url: String, schema: Class<T>): T
open fun <T> simpleJsonGet(url: String, schema: Type): T
Send a simple GET request
Link copied to clipboard
open fun <T> simpleJsonPost(url: String, body: Any, schema: Class<T>): T
open fun <T> simpleJsonPost(url: String, body: Any, schema: Type): T
Send a simple POST request with JSON body
open fun <T> simpleJsonPost(url: String, body: String, schema: Class<T>): T
open fun <T> simpleJsonPost(url: String, body: String, schema: Type): T
Send a simple POST request and parse the JSON response
Link copied to clipboard
open fun simplePost(url: String, body: String): String
Send a simple POST request