How to decode http POST data in Java?

后端 未结 3 1288
臣服心动
臣服心动 2021-02-06 11:14

I\'m using Netty, and I\'ve got to accept and parse http POST requests. As far as I can tell, Netty doesn\'t have built-in support for POSTs, only GETs. (It\'s a fairly low-leve

3条回答
  •  悲&欢浪女
    2021-02-06 11:34

    Which version of netty are you using? Netty's HttpRequest supports POST method. Not aware of any library which could parse bytes to map of params. This is usually what a servlet container does. Take a look at tomcat's source on how they have implemented processParameters() method http://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java

提交回复
热议问题