corda / net.corda.testing.http / HttpApi

HttpApi

class HttpApi

Constructors

<init>

HttpApi(root: URL, mapper: <ERROR CLASS> = defaultMapper)

Properties

mapper

val mapper: <ERROR CLASS>

root

val root: URL

Functions

getJson

fun <T : Any> getJson(path: String, params: Map<String, String> = mapOf()): T

Send a GET request to the path on the API specified.

postJson

fun postJson(path: String, data: Any = Unit): Unit

Send a POST with a payload to the path on the API specified.

postPlain

fun postPlain(path: String, data: String = ""): Unit

Send a POST with a payload to the path on the API specified.

putJson

fun putJson(path: String, data: Any = Unit): Unit

Send a PUT with a payload to the path on the API specified.

Companion Object Functions

fromHostAndPort

fun fromHostAndPort(hostAndPort: <ERROR CLASS>, base: String, protocol: String = "http", mapper: <ERROR CLASS> = defaultMapper): HttpApi