List of usage examples for io.vertx.core.http HttpHeaders CONTENT_ENCODING
CharSequence CONTENT_ENCODING
To view the source code for io.vertx.core.http HttpHeaders CONTENT_ENCODING.
Click Source Link
From source file:com.hubrick.vertx.rest.exception.HttpStatusCodeException.java
License:Apache License
/** * Return the response body as a string. * * @since 3.0.5/*w w w .jav a2 s.co m*/ */ public String getResponseBodyAsString() { final String contentEncoding = httpClientResponse.headers().get(HttpHeaders.CONTENT_ENCODING); return new String(this.responseBody, contentEncoding != null ? Charset.forName(contentEncoding) : Charset.forName(DEFAULT_CHARSET)); }