Sarat created HTTPASYNC-137:
-------------------------------
Summary: ZeroCopyPost not working with content type
multipart/form-data
Key: HTTPASYNC-137
URL: https://issues.apache.org/jira/browse/HTTPASYNC-137
Project: HttpComponents HttpAsyncClient
Issue Type: Bug
Reporter: Sarat
Team,
I have requirement to have a client to upload a file to a restful service.
File upload = new File("C:/Demo/download/Sample.zip");
ZeroCopyPost httpost = new
ZeroCopyPost("http://localhost:8080/FileUploadService/services/fileservice/upload/zip",
upload,
ContentType.create("multipart/form-data"));
eroCopyConsumer<File> consumer = new ZeroCopyConsumer<File>(upload) {
@Override
protected File process(
final HttpResponse response,
final File file,
final ContentType contentType) throws Exception {
if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
throw new ClientProtocolException("Upload failed: " +
response.getStatusLine());
}
return file;
}
};
Future<File> future = httpclient.execute(httpost,consumer,null);
Getting exception at rest service, "org.apache.cxf.interceptor.Fault: Couldn't
determine the boundary from the message!"
Note:Working fine with other clients. But i have requirement to use nio.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]