request
abstract suspend fun request(endpoint: String, path: String, filePaths: List<String>, connectionTimeout: Long, socketTimeout: Long, callback: (Int) -> Unit?, boundary: String = BOUNDARY): ByteArray
Send a HTTP request.
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). If null, default value is used.
socket Timeout
timeout for socket (millisecond). If null, default value is used.
callback
function to pass the percentage of sent firmware
boundary
boundary parameter of multipart/form-data. If this is not specified, default value is used.