Package com.firefly.server.http

Examples of com.firefly.server.http.HttpServletRequestImpl


    }

    List<HttpServletRequestImpl> list = session.request;
    Assert.assertThat(list.size(), is(1));
   
    HttpServletRequestImpl req = list.get(0);
    Assert.assertThat(req.getParameter("title"), is("测试"));
    Assert.assertThat(req.getParameter("price"), is("3.3"));
  }
View Full Code Here


    }

    List<HttpServletRequestImpl> list = session.request;
    Assert.assertThat(list.size(), is(1));
   
    HttpServletRequestImpl req = list.get(0);
    Assert.assertThat(req.getParameter("title"), is("测试"));
    Assert.assertThat(req.getParameter("price"), is(""));
  }
View Full Code Here

    }
   
    List<HttpServletRequestImpl> list = session.request;
    Assert.assertThat(list.size(), is(1));
   
    HttpServletRequestImpl req = list.get(0);
    System.out.println(req.getParameter("title"));
    System.out.println(req.getLocale().toString());
    System.out.println(req.getRequestURL().toString());
    Assert.assertThat(req.getRequestURL().toString(), is("http://localhost/firefly-demo/app/hello"));
    Assert.assertThat(req.getLocale().toString(), is("zh_CN"));
    Assert.assertThat(req.getParameter("title"), is("测试"));
    Assert.assertThat(req.getParameter("price"), nullValue());
    Assert.assertThat(req.getContentLength(), is(24));
    Assert.assertThat(req.getContentType(), is("application/x-www-form-urlencoded"));
  }
View Full Code Here

    }

    List<HttpServletRequestImpl> list = session.request;
    Assert.assertThat(list.size(), is(1));
   
    HttpServletRequestImpl req = list.get(0);
    ServletInputStream input = req.getInputStream();
    byte[] temp = new byte[30];
    byte[] data = null;
    for (int len = 0; (len = input.read(temp)) != -1;) {
      if (data == null) {
        data = new byte[len];
View Full Code Here

    }

    List<HttpServletRequestImpl> list = session.request;
    Assert.assertThat(list.size(), is(1));
   
    HttpServletRequestImpl req = list.get(0);
    BufferedReader reader = req.getReader();
    StringBuilder sb = new StringBuilder();
    for (String line = null; (line = reader.readLine()) != null;) {
      sb.append(line);
    }
    reader.close();
View Full Code Here

TOP

Related Classes of com.firefly.server.http.HttpServletRequestImpl

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.