InputFile

@JvmName(name = "of")
fun InputFile(bytes: ByteArray, defaultHeaders: Headers = Headers.Empty): InputFile(source)

Create an instance of InputFile from ByteArray.


@JvmName(name = "of")
fun InputFile(input: InputProvider, defaultHeaders: Headers = Headers.Empty): InputFile(source)

Create an instance of InputFile from InputProvider.


@JvmName(name = "of")
fun InputFile(channel: ChannelProvider, defaultHeaders: Headers = Headers.Empty): InputFile(source)

Create an instance of InputFile from ChannelProvider.


@JvmName(name = "of")
fun InputFile(byteReadPacket: ByteReadPacket, defaultHeaders: Headers = Headers.Empty): InputFile(source)

Create an instance of InputFile from ByteReadPacket.

@JvmName(name = "of")
fun InputFile(file: File, defaultHeaders: Headers = Headers.Empty): InputFile(source)

Create an instance of InputFile from File.

This InputFile Will use File.length in InputFile.includeTo, InputFile.toFormPart, and use File.readChannel in ChannelProvider.


@JvmName(name = "of")
fun InputFile(path: Path, defaultHeaders: Headers = Headers.Empty): InputFile(source)

Create an instance of InputFile from Path.

This InputFile will use Path.fileSize in InputFile.includeTo, InputFile.toFormPart, and use Files.newByteChannel, asInput in ChannelProvider.