Package jodd.http

Examples of jodd.http.HttpResponse.bodyText()


  }

  @Test
  public void testOneAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/foo/hello").send();
    assertEquals("/foo/hello.ok.jsp", response.bodyText().trim());
  }

  @Test
  public void testTwoAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/foo/boo.zoo/two.exec.html").send();
View Full Code Here


  }

  @Test
  public void testTwoAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/foo/boo.zoo/two.exec.html").send();
    assertEquals("/foo/boo.zoo/two.exec.jsp", response.bodyText().trim());
  }

  @Test
  public void testUrlRewrite() {
    HttpResponse response = HttpRequest.get("localhost:8173/f__o_o/h_e_l_l_o").send();
View Full Code Here

  }

  @Test
  public void testUrlRewrite() {
    HttpResponse response = HttpRequest.get("localhost:8173/f__o_o/h_e_l_l_o").send();
    assertEquals("/foo/hello.ok.jsp", response.bodyText().trim());
  }
}
View Full Code Here

        .query("hello.id", "1")
        .query("id", "3")
        .query("muti", "7")
        .send();

    assertEquals("**me+Jupiter+1+3**Jupiter**bye-true-7**8**jojo", response.bodyText().trim());
  }

  @Test
  public void testArgs3() {
    ArgsAction.User.counter = 0;
View Full Code Here

    response = HttpRequest.get("localhost:8173/args.user.html")
        .query("user.id", "3")
        .query("user.username", "Frank")
        .send();

    assertEquals("Hello Frank, you are number 3 or 1.", response.bodyText().trim());
  }

}
View Full Code Here

  }

  @Test
  public void testRouterFile() {
    HttpResponse response = HttpRequest.get("localhost:8173/hello.html").send();
    assertEquals("hello", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/helloWorld.html?name=Jupiter&data=3").send();
    assertEquals("Hello world planet Jupiter and Universe 3", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/re/view/234").send();
View Full Code Here

  public void testRouterFile() {
    HttpResponse response = HttpRequest.get("localhost:8173/hello.html").send();
    assertEquals("hello", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/helloWorld.html?name=Jupiter&data=3").send();
    assertEquals("Hello world planet Jupiter and Universe 3", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/re/view/234").send();
    assertEquals("234", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/alpha.ciao.html").send();
View Full Code Here

    response = HttpRequest.get("localhost:8173/helloWorld.html?name=Jupiter&data=3").send();
    assertEquals("Hello world planet Jupiter and Universe 3", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/re/view/234").send();
    assertEquals("234", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/alpha.ciao.html").send();
    assertEquals("alpha.hello.jsp", response.bodyText().trim());
  }
View Full Code Here

    response = HttpRequest.get("localhost:8173/re/view/234").send();
    assertEquals("234", response.bodyText().trim());

    response = HttpRequest.get("localhost:8173/alpha.ciao.html").send();
    assertEquals("alpha.hello.jsp", response.bodyText().trim());
  }

  @Test
  public void testZigZag() {
    HttpResponse response = HttpRequest.get("localhost:8173/zigzag/123").send();
View Full Code Here

  }

  @Test
  public void testZigZag() {
    HttpResponse response = HttpRequest.get("localhost:8173/zigzag/123").send();
    assertEquals("zigzag 123", response.bodyText().trim());
  }

  @Test
  public void testUserWithRoute() {
    HttpResponse response = HttpRequest.get("localhost:8173/sys/user/456").send();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.