RequestEntity (String requestBody) { try { return new StringRequestEntity(requestBody, "application/json", CharsetToolkit.UTF8); } catch (UnsupportedEncodingException e) { throw new AssertionError("UTF-8 encoding is not supported"); } }