2013-02-18 79 views
0

HTTPServletRequest包含以下信息。现在如何读取的HttpServletRequest的该请求头部的内容类型是application/X WWW的窗体-urlencoded在Java

headers: 
    Accept-Encoding: gzip, deflate 
    X-Chargify-Webhook-Signature: b048ad28f573829f52f05208aa522a6f 
    X-Chargify-Webhook-Id: "8233897" 
    Content-Type: application/x-www-form-urlencoded 
    Accept: "*/*; q=0.5, application/xml" 
    Content-Length: "47" 
body: payload[chargify]=testing&id=8233897&event=test 

,如何读取身体身体从请求和身体分为键/值对?

回答

0

Servlet service()方法有HttPServlerRequest对象。

通过使用该Request对象调用request.getParameter(paramName),你可以从请求对象获得价值

Refference

相关问题