kvision / pl.treksoft.kvision.electron / ClientRequest

ClientRequest

open external class ClientRequest : EventEmitter

Constructors

<init>

ClientRequest(options: String)
ClientRequest(options: String)
ClientRequest(options: String)
ClientRequest(options: String)
ClientRequest(options: String)
ClientRequest(options: String)
ClientRequest(options: String)
ClientRequest(options: String)
ClientRequest(options: String)
ClientRequest(options: String)

Properties

chunkedEncoding

open var chunkedEncoding: Boolean

Functions

abort

open fun abort(): Unit

addListener

open fun addListener(event: String, listener: Function<*>): ClientRequest
open fun addListener(event: String, listener: Function<*>): ClientRequest
open fun addListener(event: String, listener: (Error) -> Unit): ClientRequest
open fun addListener(event: String, listener: Function<*>): ClientRequest
open fun addListener(event: String, listener: (authInfo: AuthInfo, callback: (username: String, password: String) -> Unit) -> Unit): ClientRequest
open fun addListener(event: String, listener: (statusCode: Number, method: String, redirectUrl: String, responseHeaders: Any) -> Unit): ClientRequest
open fun addListener(event: String, listener: (response: IncomingMessage) -> Unit): ClientRequest

end

open fun end(chunk: String? = definedExternally, encoding: String? = definedExternally, callback: Function<*>? = definedExternally): Unit
open fun end(chunk: <ERROR CLASS>? = definedExternally, encoding: String? = definedExternally, callback: Function<*>? = definedExternally): Unit
open fun end(): Unit

followRedirect

open fun followRedirect(): Unit

getHeader

open fun getHeader(name: String): Header

on

open fun on(event: String, listener: Function<*>): ClientRequest
open fun on(event: String, listener: Function<*>): ClientRequest
open fun on(event: String, listener: (Error) -> Unit): ClientRequest
open fun on(event: String, listener: Function<*>): ClientRequest
open fun on(event: String, listener: (authInfo: AuthInfo, callback: (username: String, password: String) -> Unit) -> Unit): ClientRequest
open fun on(event: String, listener: (statusCode: Number, method: String, redirectUrl: String, responseHeaders: Any) -> Unit): ClientRequest
open fun on(event: String, listener: (response: IncomingMessage) -> Unit): ClientRequest

once

open fun once(event: String, listener: Function<*>): ClientRequest
open fun once(event: String, listener: Function<*>): ClientRequest
open fun once(event: String, listener: (Error) -> Unit): ClientRequest
open fun once(event: String, listener: Function<*>): ClientRequest
open fun once(event: String, listener: (authInfo: AuthInfo, callback: (username: String, password: String) -> Unit) -> Unit): ClientRequest
open fun once(event: String, listener: (statusCode: Number, method: String, redirectUrl: String, responseHeaders: Any) -> Unit): ClientRequest
open fun once(event: String, listener: (response: IncomingMessage) -> Unit): ClientRequest

removeHeader

open fun removeHeader(name: String): Unit

removeListener

open fun removeListener(event: String, listener: Function<*>): ClientRequest
open fun removeListener(event: String, listener: Function<*>): ClientRequest
open fun removeListener(event: String, listener: (Error) -> Unit): ClientRequest
open fun removeListener(event: String, listener: Function<*>): ClientRequest
open fun removeListener(event: String, listener: (authInfo: AuthInfo, callback: (username: String, password: String) -> Unit) -> Unit): ClientRequest
open fun removeListener(event: String, listener: (statusCode: Number, method: String, redirectUrl: String, responseHeaders: Any) -> Unit): ClientRequest
open fun removeListener(event: String, listener: (response: IncomingMessage) -> Unit): ClientRequest

setHeader

open fun setHeader(name: String, value: Any): Unit

write

open fun write(chunk: String, encoding: String? = definedExternally, callback: Function<*>? = definedExternally): Unit
open fun write(chunk: <ERROR CLASS>, encoding: String? = definedExternally, callback: Function<*>? = definedExternally): Unit

Inherited Functions

emit

open fun emit(event: String, vararg args: Any): Boolean

eventNames

open fun eventNames(): Array<String>

getMaxListeners

open fun getMaxListeners(): Number

listenerCount

open fun listenerCount(type: String): Number

listeners

open fun listeners(event: String): Array<Function<*>>

prependListener

open fun prependListener(event: String, listener: Function<*>): EventEmitter

prependOnceListener

open fun prependOnceListener(event: String, listener: Function<*>): EventEmitter

removeAllListeners

open fun removeAllListeners(event: String? = definedExternally): EventEmitter

setMaxListeners

open fun setMaxListeners(n: Number): EventEmitter

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.