Package jodd.http

Examples of jodd.http.HttpResponse.bodyText()


    // send it again

    response = HttpRequest.get("http://localhost:8173/hello.html").send();

    assertEquals("Hello world Jupiter! zap!", response.bodyText());
  }

}
View Full Code Here


    HttpResponse response = HttpRequest
        .get("localhost:8173/text.jsp")
        .query("iname", "foo")
        .send();

    assertEquals(TEXT_RESULT, response.bodyText().trim());
  }

  @Test
  public void testFormTagTextGetWithValue() {
    HttpResponse response = HttpRequest
View Full Code Here

    HttpResponse response = HttpRequest
        .get("localhost:8173/text2.jsp")
        .query("iname", "foo")
        .send();

    assertEquals(TEXT_RESULT, response.bodyText().trim());
  }

  @Test
  public void testFormTagTextPost() {
    HttpResponse response = HttpRequest
View Full Code Here

    HttpResponse response = HttpRequest
        .post("localhost:8173/text.jsp")
        .form("iname", "foo")
        .send();

    assertEquals(TEXT_RESULT, response.bodyText().trim());
  }

  @Test
  public void testFormTagTextPostMulti() {
    HttpResponse response = HttpRequest
View Full Code Here

        .post("localhost:8173/text.jsp")
        .form("iname", "foo")
        .multipart(true)
        .send();

    assertEquals(TEXT_RESULT, response.bodyText().trim());
  }
}
View Full Code Here

  }

  @Test
  public void testIn1Action() {
    HttpResponse response = HttpRequest.get("localhost:8173/cpt.in1.html?foo=173").send();
    assertEquals("param:  = 173", response.bodyText().trim());
  }

  @Test
  public void testIn2Action() {
    HttpResponse response = HttpRequest.get("localhost:8173/cpt.in2.html?foo=173&foo2=173").send();
View Full Code Here

  }

  @Test
  public void testIn2Action() {
    HttpResponse response = HttpRequest.get("localhost:8173/cpt.in2.html?foo=173&foo2=173").send();
    assertEquals("param: 173 = 173", response.bodyText().trim());
  }

  @Test
  public void testAppendingAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/cpt.inap.html").send();
View Full Code Here

  }

  @Test
  public void testAppendingAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/cpt.inap.html").send();
    assertEquals("value=appending<jodd>", response.bodyText().trim());
  }

  @Test
  public void testAppending2Action() {
    HttpResponse response = HttpRequest.get("localhost:8173/cpt.inap2.html").send();
View Full Code Here

  }

  @Test
  public void testAppending2Action() {
    HttpResponse response = HttpRequest.get("localhost:8173/cpt.inap2.html").send();
    assertEquals("value=appending2<heyp>", response.bodyText().trim());
  }

  @Test
  public void testAppending3Action() {
    HttpResponse response = HttpRequest.get("localhost:8173/cpt.inap3.html").send();
View Full Code Here

  }

  @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

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.