execute With Multipart Form
Execute the request with the specified object as multipart form-data. May not be used in GET requests.
Please note that this will set the Transfer-Encoding to chunked. Some servers may not support this. To upload un-chunked (will lead to running out of memory when uploading large files), call executeWithMultipartForm(params, false)
Return
Response
Parameters
params
Map of params. These will be converted in the following way:
- File: Append filename and content-type, then append the bytes of the file
- InputStream: Read the stream fully and append the bytes
- Other: Objects.toString() and append
Throws
if an I/O exception occurred
open fun executeWithMultipartForm(@NonNull params: Map<String, Any>, doChunkedUploading: Boolean): Http.Response
Parameters
do Chunked Uploading
Whether to upload in chunks. If this is false, a buffer will be allocated to hold the entire multi part form. When uploading large files this way, you will run out of memory. Not every server supports this, also does not support redirects.