Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -X POST -F 'phrase=hi there' http://example.com/test
- @Override
- public void doPost(HttpServletRequest req, HttpServletResponse resp)
- throws ServletException, IOException
- {
- if (req.getParameterMap() != null &&
- !req.getParameterMap().isEmpty())
- {
- // nope.
- }
- if (req.getInputStream() != null) {
- // yep.
- }
- }
- --------------------------636cc0f5704135cf
- Content-Disposition: form-data; name="phrase"
- hi there
- --------------------------636cc0f5704135cf--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement