Package jodd.http

Examples of jodd.http.HttpResponse.bodyText()


    assertEquals(302, response.statusCode());

    String redirectLocation = response.header("location");

    response = HttpRequest.get(redirectLocation).send();
    assertEquals("value = [888]", response.bodyText());
  }

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


  }

  @Test
  public void testOneRedirectPermanentAction() {
    HttpResponse response = HttpRequest.get("localhost:8173/oneRedirect.perm.html").send();
    assertEquals("", response.bodyText());
    assertEquals(301, response.statusCode());

    String redirectLocation = response.header("location");
    assertEquals("/two.html?value=444", redirectLocation);
  }
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.