Hi,
I am able to do it using Apache HttpComponents.
Here is the code:
HttpPost httpPost = new HttpPost(RESTful URL);
httpPost.addHeader("Content-Type", "text/csv");
FileEntity fileEntity = new FileEntity(new File(fileName), "text/csv");
httpPost.setEntity(fileEntity);
HttpClient httpClient = new DefaultHttpClient();
HttpResponse httpResponse = httpClient.execute(httpPost);
httpResponse.getStatusLine();
JSONObject json = new JSONObject(EntityUtils.toString(httpEntity));
I can switch back to Jersey in my project,
provided the above scenario can be made working using Jersey.
Looking forward for your help.
Thanking you,
With Regards
Sree