corda / net.corda.testing.http / HttpUtils

HttpUtils

object HttpUtils

A small set of utilities for making HttpCalls, aimed at demos and tests.

Properties

defaultMapper

val defaultMapper: <ERROR CLASS>

Functions

getJson

fun <T : Any> getJson(url: URL, params: Map<String, String> = mapOf(), mapper: <ERROR CLASS> = defaultMapper): T

postJson

fun postJson(url: URL, data: String): Unit

postPlain

fun postPlain(url: URL, data: String): Unit

putJson

fun putJson(url: URL, data: String): Unit

Extension Functions

contextLogger

fun Any.contextLogger(): <ERROR CLASS>

When called from a companion object, returns the logger for the enclosing class.