Examples of bodyBytes()


Examples of jodd.http.HttpResponse.bodyBytes()

  @Test
  public void testRawResult() {
    HttpResponse httpResponse = HttpRequest.get("localhost:8173/madvocRawImage").send();
    assertEquals(200, httpResponse.statusCode());
    assertEquals("image/gif", httpResponse.contentType());
    byte[] bytes = httpResponse.bodyBytes();
    assertArrayEquals(RawResultAction.SMALLEST_GIF, bytes);
  }

  // ---------------------------------------------------------------- text
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.