AngularJS http POST to Servlet

后端 未结 3 1145
被撕碎了的回忆
被撕碎了的回忆 2020-12-16 09:01

I went through a lot of StackOverflow answers and googled a lot but still could not find why my post request is not working.

This is my jsp:

3条回答
  •  隐瞒了意图╮
    2020-12-16 09:09

    You are using a POST request and your data is sent in the request body - not as parameter. You need to read the content using request.getReader().

    // example using the javax.json.stream package
    JsonParser parser = Json.createParserFactory().createParser(request.getReader());
    

提交回复
热议问题