kvision / pl.treksoft.kvision.electron / ClientRequest

ClientRequest

(js) open class ClientRequest : EventEmitter

Constructors

(js)

<init>

ClientRequest(options: String)

Properties

(js)

chunkedEncoding

open var chunkedEncoding: Boolean

Functions

(js)

abort

open fun abort(): Unit
(js)

addListener

open fun addListener(event: String, listener: Function<*>): ClientRequest
open fun addListener(event: String, listener: (error: Error) -> Unit): 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
(js)

end

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

followRedirect

open fun followRedirect(): Unit
(js)

getHeader

open fun getHeader(name: String): Header
(js)

on

open fun on(event: String, listener: Function<*>): ClientRequest
open fun on(event: String, listener: (error: Error) -> Unit): 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
(js)

once

open fun once(event: String, listener: Function<*>): ClientRequest
open fun once(event: String, listener: (error: Error) -> Unit): 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
(js)

removeHeader

open fun removeHeader(name: String): Unit
(js)

removeListener

open fun removeListener(event: String, listener: Function<*>): ClientRequest
open fun removeListener(event: String, listener: (error: Error) -> Unit): 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
(js)

setHeader

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

write

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