class HttpApi
<init> |
HttpApi(root: URL, mapper: ObjectMapper = defaultMapper) |
mapper |
val mapper: ObjectMapper |
root |
val root: URL |
getJson |
Send a GET request to the path on the API specified. fun <T : Any> getJson(path: String, params: Map<String, String> = mapOf()): T |
postJson |
Send a POST with a payload to the path on the API specified. fun postJson(path: String, data: Any = Unit): Unit |
postPlain |
Send a POST with a payload to the path on the API specified. fun postPlain(path: String, data: String = ""): Unit |
putJson |
Send a PUT with a payload to the path on the API specified. fun putJson(path: String, data: Any = Unit): Unit |
fromHostAndPort |
fun fromHostAndPort(hostAndPort: NetworkHostAndPort, base: String, protocol: String = "http", mapper: ObjectMapper = defaultMapper): HttpApi |