Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- language: lang-java -->
- @ResponseStatus(OK)
- @RequestMapping(value = {"/v1/transform"}, method = RequestMethod.POST)
- @ResponseBody
- public TransformIdDTO transformFile(
- @RequestPart("file") MultipartFile [] multipartFile,
- @RequestParam("from") String from,
- @RequestParam("to") String to,
- final HttpServletResponse response) throws IOException, MessagingException
- <!-- language: lang-java -->
- HttpClient client = new HttpClient();
- PostMethod method1 = new PostMethod("URI");
- Part[] parts = {new FilePart("file", f),new StringPart("from","html"),new StringPart("to","PDF")};
- method1.setRequestEntity(new MultipartRequestEntity(parts, method1.getParams()));
- int returnCode = client.executeMethod(method1);
- System.out.println(returnCode);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement