Trying to get parameters from a PUT request using HttpServlet#doPut:
public void doPut(HttpServletRequest request, HttpServletResponse response) {
String name = request.getParameter("name");
// name is null
}
Using curl to send the request:
curl -X PUT \
--data "name=batman" \
--header "Content-Type: text/plain" http://localhost:8080/sample.html
works fine with using doGet and GET curl request. Am I missing something?