@Test public void shouldConvertToHttpRequestBody() throws Exception { HttpRequestBody expectedHttpRequestBody = new HttpRequestBody("application/x-www-form-urlencoded; charset=UTF-8", "key1=value1&key2=value2", "UTF-8"); HttpRequestBody httpRequestBody = requestMap.toHttpRequestBody("UTF-8"); assertEquals(expectedHttpRequestBody, httpRequestBody); }
public HttpRequestBody toHttpRequestBody(String charset) throws UnsupportedEncodingException { return new HttpRequestBody( String.format("application/x-www-form-urlencoded; charset=%s", charset), toUrlEncode(charset), charset); }
RequestMap { public HttpRequestBody toHttpRequestBody(String charset) throws UnsupportedEncodingException { return new HttpRequestBody( String.format("application/x-www-form-urlencoded; charset=%s", charset), toUrlEncode(charset), charset); } }
RequestMap { public HttpRequestBody toHttpRequestBody(String charset) throws UnsupportedEncodingException { return new HttpRequestBody( String.format("application/x-www-form-urlencoded; charset=%s", charset), toUrlEncode(charset), charset); } RequestMap();  RequestMap(Map<String, String> map); }
RequestMap { public HttpRequestBody toHttpRequestBody(String charset) throws UnsupportedEncodingException { return new HttpRequestBody( String.format("application/x-www-form-urlencoded; charset=%s", charset), toUrlEncode(charset), charset); } RequestMap();  RequestMap(Map<String, String> map); RequestMap putMap(RequestMap requestMap); RequestMap putMap(Map<String, String> map); RequestMap putString(String key, String value); RequestMap putString(String key, StringBuilder value); RequestMap putInteger(String key, Integer value); RequestMap putCurrency(String key, BigDecimal value); RequestMap putCurrency(String key, Currency value); RequestMap putDate(String key, Date value, DateFormat dateFormat); RequestMap putConfigValue(String key, Config config); String toUrlEncode(String charset); HttpRequestBody toHttpRequestBody(String charset); @Override String toString(); @Override boolean equals(Object o); }
RequestMap { public HttpRequestBody toHttpRequestBody(String charset) throws UnsupportedEncodingException { return new HttpRequestBody( String.format("application/x-www-form-urlencoded; charset=%s", charset), toUrlEncode(charset), charset); } RequestMap();  RequestMap(Map<String, String> map); RequestMap putMap(RequestMap requestMap); RequestMap putMap(Map<String, String> map); RequestMap putString(String key, String value); RequestMap putString(String key, StringBuilder value); RequestMap putInteger(String key, Integer value); RequestMap putCurrency(String key, BigDecimal value); RequestMap putCurrency(String key, Currency value); RequestMap putDate(String key, Date value, DateFormat dateFormat); RequestMap putConfigValue(String key, Config config); String toUrlEncode(String charset); HttpRequestBody toHttpRequestBody(String charset); @Override String toString(); @Override boolean equals(Object o);  }