Package jodd.http

Examples of jodd.http.HttpResponse


    assertEquals("value=appending2<heyp>", response.bodyText().trim());
  }

  @Test
  public void testAppending3Action() {
    HttpResponse response = HttpRequest.get("localhost:8173/cpt.inap3.html").send();
    assertEquals("value=appending3<jodd>", response.bodyText().trim());
  }
View Full Code Here


    MadvocSuite.stopTomcat();
  }

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

    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();
    assertEquals("/foo/boo.zoo/two.exec.jsp", response.bodyText().trim());
  }
View Full Code Here

    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();
    assertEquals("/foo/hello.ok.jsp", response.bodyText().trim());
  }
View Full Code Here

  }

  @Test
  public void testArgs3() {
    ArgsAction.User.counter = 0;
    HttpResponse response;
    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

    MadvocTwoSuite.stopTomcat();
  }

  @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();
    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

    assertEquals("alpha.hello.jsp", response.bodyText().trim());
  }

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

    assertEquals("zigzag 123", response.bodyText().trim());
  }

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

    assertEquals("Huh 456.", response.bodyText().trim());
  }

  @Test
  public void testBook() {
    HttpResponse response;
    response = HttpRequest.get("localhost:8173/book/123").send();

    assertEquals("MyBook: 123:Songs of Distant Earth.", response.bodyText().trim());
  }
View Full Code Here

    MadvocSuite.stopTomcat();
  }

  @Test
  public void testHelloAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/hello.html").send();
    assertEquals("hello", response.bodyText().trim());
  }
View Full Code Here

TOP

Related Classes of jodd.http.HttpResponse

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.