@Test public void largeStringBody() throws Exception { StringBuilder stb = new StringBuilder(); for (int i = 0; i < 1500; i++) { stb.append("0123456789"); } stringBody(stb.toString()); }
@Override @SuppressWarnings("resource") public String toString() { Formatter fmt = new Formatter(); fmt.format("REQUEST{%s %s", method(), this.exchange.getRequestPath()); fmt.format(" ,Headers:[%s]", headers()); fmt.format(" ,Cookies:[%s]", cookies()); fmt.format(" ,Forms:[%s]}", forms()); return fmt.toString(); }
SidenRequest implements Request { @Override @SuppressWarnings("resource") public String toString() { Formatter fmt = new Formatter(); fmt.format("REQUEST{%s %s", method(), this.exchange.getRequestPath()); fmt.format(" ,Headers:[%s]", headers()); fmt.format(" ,Cookies:[%s]", cookies()); fmt.format(" ,Forms:[%s]}", forms()); return fmt.toString(); } }
SidenRequest implements Request { @Override @SuppressWarnings("resource") public String toString() { Formatter fmt = new Formatter(); fmt.format("REQUEST{%s %s", method(), this.exchange.getRequestPath()); fmt.format(" ,Headers:[%s]", headers()); fmt.format(" ,Cookies:[%s]", cookies()); fmt.format(" ,Forms:[%s]}", forms()); return fmt.toString(); } SidenRequest(HttpServerExchange exchange); }
SidenRequest implements Request { @Override @SuppressWarnings("resource") public String toString() { Formatter fmt = new Formatter(); fmt.format("REQUEST{%s %s", method(), this.exchange.getRequestPath()); fmt.format(" ,Headers:[%s]", headers()); fmt.format(" ,Cookies:[%s]", cookies()); fmt.format(" ,Forms:[%s]}", forms()); return fmt.toString(); } SidenRequest(HttpServerExchange exchange); @Override HttpMethod method(); @Override String path(); @Override Optional<String> params(String key); @Override Map<String, String> params(); @Override Optional<String> query(String key); @Override Optional<String> header(String key); @Override List<String> headers(String key); @Override Map<String, List<String>> headers(); @Override Map<String, Cookie> cookies(); @Override Optional<Cookie> cookie(String key); @Override Optional<String> form(String key); @Override List<String> forms(String key); @Override Map<String, List<String>> forms(); @Override Optional<File> file(String key); @Override List<File> files(String key); @Override Map<String, List<File>> files(); @Override Optional<String> body(); @Override Session session(); @Override Optional<Session> current(); @Override boolean xhr(); @Override String protocol(); @Override String scheme(); @Override @SuppressWarnings("unchecked") Optional<T> attr(String key); @Override @SuppressWarnings("unchecked") Optional<T> attr(String key, T newone); @Override @SuppressWarnings("unchecked") Iterator<Attr> iterator(); @Override @SuppressWarnings("unchecked") Optional<T> remove(String key); @Override HttpServerExchange raw(); @Override @SuppressWarnings("resource") String toString(); }
SidenRequest implements Request { @Override @SuppressWarnings("resource") public String toString() { Formatter fmt = new Formatter(); fmt.format("REQUEST{%s %s", method(), this.exchange.getRequestPath()); fmt.format(" ,Headers:[%s]", headers()); fmt.format(" ,Cookies:[%s]", cookies()); fmt.format(" ,Forms:[%s]}", forms()); return fmt.toString(); } SidenRequest(HttpServerExchange exchange); @Override HttpMethod method(); @Override String path(); @Override Optional<String> params(String key); @Override Map<String, String> params(); @Override Optional<String> query(String key); @Override Optional<String> header(String key); @Override List<String> headers(String key); @Override Map<String, List<String>> headers(); @Override Map<String, Cookie> cookies(); @Override Optional<Cookie> cookie(String key); @Override Optional<String> form(String key); @Override List<String> forms(String key); @Override Map<String, List<String>> forms(); @Override Optional<File> file(String key); @Override List<File> files(String key); @Override Map<String, List<File>> files(); @Override Optional<String> body(); @Override Session session(); @Override Optional<Session> current(); @Override boolean xhr(); @Override String protocol(); @Override String scheme(); @Override @SuppressWarnings("unchecked") Optional<T> attr(String key); @Override @SuppressWarnings("unchecked") Optional<T> attr(String key, T newone); @Override @SuppressWarnings("unchecked") Iterator<Attr> iterator(); @Override @SuppressWarnings("unchecked") Optional<T> remove(String key); @Override HttpServerExchange raw(); @Override @SuppressWarnings("resource") String toString();  }