xlightweb send multipart/form-data set wrong header
Status: Inactive
Brought to you by:
grro
xlightweb send multipart/form-data has a bug,the header it set is "multipart/mixed; .....".and netty can not support decode it.xlightweb's version is 2.13.2.
import org.xlightweb.IHttpResponse;
import org.xlightweb.MultipartFormDataRequest;
import org.xlightweb.client.HttpClient;
...
MultipartFormDataRequest request = new MultipartFormDataRequest("http://localhost:9090/push");
for (Map.Entry entry : object.entrySet()) {
request.addPart(entry.getKey(), "text/html; charset=UTF-8", entry.getValue().getAsString());
}
HttpClient httpClient = new HttpClient();
...
IHttpResponse response = httpClient.call(request);