Guest User

Untitled

a guest
Jul 17th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. @Api
  2. @Path("/v1/multipart-request")
  3. @Consumes(MediaType.MULTIPART_FORM_DATA)
  4. public void doSomething(@MultiPartForm MyForm){
  5. ...
  6. }
  7.  
  8. class MyForm {
  9. @FormParam("items")
  10. List<String> items;
  11. }
  12.  
  13. ------WebKitFormBoundary7MA4YWxkTrZu0gW
  14. Content-Disposition: form-data; name="items[0]"
  15.  
  16. firstItem
  17. ------WebKitFormBoundary7MA4YWxkTrZu0gW
  18. Content-Disposition: form-data; name="items[1]"
  19.  
  20. secondItem
  21. ------WebKitFormBoundary7MA4YWxkTrZu0gW
Add Comment
Please, Sign In to add comment