tornadofx / tornadofx / Rest

Rest

open class Rest : Controller

Types

Engine abstract class Engine
Request interface Request
Response interface Response : Closeable

Constructors

<init> Rest()

Properties

authContext var authContext: AuthContext?
baseURI var baseURI: String?
engine var engine: Engine
proxy var proxy: Proxy?

Functions

delete fun delete(path: String, data: JsonValue? = null, processor: (Request) -> Unit = {}): Response
fun delete(path: String, data: JsonModel, processor: (Request) -> Unit = {}): <ERROR CLASS>
execute fun execute(method: Method, target: String, data: Any? = null, processor: (Request) -> Unit = {}): Response
get fun get(path: String, data: JsonValue? = null, processor: (Request) -> Unit = {}): Response
fun get(path: String, data: JsonModel, processor: (Request) -> Unit = {}): <ERROR CLASS>
getURI fun getURI(path: String): URI
patch fun patch(path: String, data: JsonValue? = null, processor: (Request) -> Unit = {}): Response
fun patch(path: String, data: JsonModel, processor: (Request) -> Unit = {}): <ERROR CLASS>
fun patch(path: String, data: InputStream, processor: (Request) -> Unit = {}): Response
post fun post(path: String, data: JsonValue? = null, processor: (Request) -> Unit = {}): Response
fun post(path: String, data: JsonModel, processor: (Request) -> Unit = {}): <ERROR CLASS>
fun post(path: String, data: InputStream, processor: (Request) -> Unit = {}): Response
put fun put(path: String, data: JsonValue? = null, processor: (Request) -> Unit = {}): Response
fun put(path: String, data: JsonModel, processor: (Request) -> Unit = {}): <ERROR CLASS>
fun put(path: String, data: InputStream, processor: (Request) -> Unit = {}): Response
reset fun reset(): Unit
setBasicAuth fun setBasicAuth(username: String, password: String): Unit
setDigestAuth fun setDigestAuth(username: String, password: String): Unit

Companion Object Properties

atomicseq val atomicseq: AtomicLong
engineProvider var engineProvider: (Rest) -> Engine
ongoingRequests val ongoingRequests: ObservableList<Request>

Companion Object Functions

useApacheHttpClient fun useApacheHttpClient(): Unit

Extension Functions

getProperty fun <T> Any.getProperty(prop: KMutableProperty1<*, T>): ObjectProperty<T>
observable fun <T : Any> Any.observable(propName: String): ObjectProperty<T>