[TIMOB-3145] Using multipart POST with HTTPClient
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-07T22:55:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Andre Carregal |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:38:01.000+0000 |
Updated | 2017-06-07T22:55:37.000+0000 |
Description
Currently there is no way to POST multipart messages using HTTPClient. Are there any plans to do so?
Need to discuss how we're going to break up XHR/HTTPClient going forward. Don't want to put multipart features in a single-request architecture.
Call me naive if you want, but what about keeping full compatibility with the current API by using an optional second parameter for HTTPClient.send? I was thinking in something like:
where data would have the current semantics and multipart, if present, would be an Array with multiple file objects and their properties:
The presence of multipart would also signal the need for a multipart protocol instead of the default one. In that case the function would change the response preamble accordingly and add a functional boundary string.
The function could also infer Content-Type for each part using the filename extension, so a full example could be something like:
Closing ticket due to time passed.