Examples of bodyText()


Examples of jodd.http.HttpResponse.bodyText()

  }

  @Test
  public void testChain() {
    HttpResponse response = HttpRequest.get("localhost:8173/hello.chain.html?chain=7").send();
    assertEquals("chain:9", response.bodyText().trim());
  }

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

Examples of jodd.http.HttpResponse.bodyText()

  }

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

}
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

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

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

  @Test
  public void testBookPost() {
    HttpResponse response;
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

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

    assertEquals("NewBook: 123:Songs of Distant Earth.", response.bodyText().trim());
  }

  @Test
  public void testBookPut() {
    HttpResponse response;
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

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

    assertEquals("OldBook: 123:Songs of Distant Earth.", response.bodyText().trim());
  }

  @Test
  public void testBookPartial() {
    HttpResponse response = HttpRequest.put("localhost:8173/bookPartial.hello.html")
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

    HttpResponse response = HttpRequest.put("localhost:8173/bookPartial.hello.html")
        .query("book.iban", "123123123")
        .query("book.foo", "not used")
        .send();

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

Examples of jodd.http.HttpResponse.bodyText()

  }

  @Test
  public void testRawAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/raw.html").send();
    assertEquals("this is some raw direct result", response.bodyText().trim());
  }

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

Examples of jodd.http.HttpResponse.bodyText()

  }

  @Test
  public void testRawTextAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/raw.text.html").send();
    assertEquals("some raw txt", response.bodyText().trim());
  }

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

Examples of jodd.http.HttpResponse.bodyText()

  @Test
  public void testRawDownloadAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/raw.download").send();
    assertEquals("attachment;filename=\"jodd-download.txt\"", response.header("content-disposition"));
    assertEquals("file from jodd.org!", response.bodyText().trim());
  }

}
View Full Code Here

Examples of jodd.http.HttpResponse.bodyText()

  @Test
  public void testDisableTag() {
    HttpResponse response = HttpRequest
        .get("localhost:8173/tag/disable/123")
        .send();
    assertEquals("disable-Tag{123:jodd}", response.bodyText().trim());
  }

  @Test
  public void testDeleteTag() {
    HttpResponse response = HttpRequest
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.