HttpSessionStore.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:mqttserver 作者:
public static String getPostParameter(HttpRequest req, String name) {
    HttpPostRequestDecoder decoder = new HttpPostRequestDecoder(
            new DefaultHttpDataFactory(false), req);

    InterfaceHttpData data = decoder.getBodyHttpData(name);
    if (data.getHttpDataType() == HttpDataType.Attribute) {
        Attribute attribute = (Attribute) data;
        String value = null;
        try {
            value = attribute.getValue();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return value;
    }

    return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号