Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. curl -X POST -F 'phrase=hi there' http://example.com/test
  2.  
  3. @Override
  4. public void doPost(HttpServletRequest req, HttpServletResponse resp)
  5. throws ServletException, IOException
  6. {
  7. if (req.getParameterMap() != null &&
  8. !req.getParameterMap().isEmpty())
  9. {
  10. // nope.
  11. }
  12.  
  13. if (req.getInputStream() != null) {
  14. // yep.
  15. }
  16. }
  17.  
  18. --------------------------636cc0f5704135cf
  19. Content-Disposition: form-data; name="phrase"
  20.  
  21. hi there
  22. --------------------------636cc0f5704135cf--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement