@Test public void replacingBodyWithBytes() throws IOException { byte[] bytes = "Hello RawHTTP".getBytes(); RawHttp http = new RawHttp(); RawHttpRequest request = http.parseRequest("POST http://example.com/hello"); RawHttpRequest requestWithBody = request.withBody( new BytesBody(bytes, "text/plain")); System.out.println(requestWithBody.eagerly()); }