kohttp / io.github.rybalkinsd.kohttp.dsl / upload

upload

fun upload(client: Factory = defaultHttpClient, init: UploadContext.() -> Unit): Response

Method provides a synchronous DSL call of HTTP POST to UPLOAD file

Parameters

client - allow to use your own implementation of HttpClient. defaultHttpClient is used by default.

Return

a Response instance.

Usage example with default defaultHttpClient:

See Also

Response

HttpDeleteContext

Since
0.8.0

Author
sergey