request
open suspend override fun request(endpoint: String, path: String, filePaths: List<String>, connectionTimeout: Long, socketTimeout: Long, callback: (Int) -> Unit?, boundary: String): ByteArray
Send a HTTP request of multipart post and receive the response.
Return
body of the response
Parameters
endpoint
endpoint of Web API, eg. "http://192.198.1.1:80/"
path
request target of HTTP
file Paths
Content of each part
connection Timeout
timeout for connection (millisecond).
socket Timeout
timeout for socket (millisecond).
callback
function to pass the percentage of sent firmware
boundary
boundary parameter of multipart/form-data
Throws
when the host returns an error.