Package org.jboss.netty.handler.codec.http

Examples of org.jboss.netty.handler.codec.http.QueryStringEncoder$Param


            JSONArray jsonArray = jsonObject.getJSONArray("params");
            for(int i=0; i<jsonArray.length(); i++) {
                try {
                    String paramName    = jsonArray.getJSONObject(i).getString("name");
                    String paramDefault = jsonArray.getJSONObject(i).getString("default");
                    Param param = request.addNewParam();
                    param.setName(paramName);
                    param.setDefault(paramDefault);
                    param.setStyle(ParamStyle.Enum.forString("query"));
                    param.setType("xs:string");
                } catch (JSONException ex) {
                    Logger.getLogger(WADLGenerator.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        } catch (JSONException ex) {
View Full Code Here


            bootstrap.releaseExternalResources();
            return null;
        }

        // Prepare the HTTP request.
        QueryStringEncoder encoder = new QueryStringEncoder(get);
        // add Form attribute
        encoder.addParam("getform", "GET");
        encoder.addParam("info", "first value");
        encoder.addParam("secondinfo", "secondvalue ���&");
        // not the big one since it is not compatible with GET size
        // encoder.addParam("thirdinfo", textArea);
        encoder.addParam("thirdinfo", "third value\r\ntest second line\r\n\r\nnew line\r\n");
        encoder.addParam("Send", "Send");

        URI uriGet;
        try {
            uriGet = new URI(encoder.toString());
        } catch (URISyntaxException e) {
            logger.error("Error: " + e.getMessage());
            bootstrap.releaseExternalResources();
            return null;
        }
View Full Code Here

TOP

Related Classes of org.jboss.netty.handler.codec.http.QueryStringEncoder$Param

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.