Skip to content

Commit

Permalink
Merge remote-tracking branch 'rkaw/PUT_POST_ContentType' into merged-…
Browse files Browse the repository at this point in the history
…pull-requests jgritman#32
  • Loading branch information
jja committed Aug 10, 2020
2 parents 72fb50a + 5e5edc1 commit 7418e6e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/main/java/groovyx/net/http/EncoderRegistry.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ else if ( data instanceof Reader && ! (data instanceof BufferedReader) )
* @return an {@link HttpEntity} encapsulating this request data
* @throws UnsupportedEncodingException
*/
public UrlEncodedFormEntity encodeForm( Map<?,?> params )
throws UnsupportedEncodingException {
return encodeForm( params, null );
}

public UrlEncodedFormEntity encodeForm( Map<?,?> params, Object contentType )
throws UnsupportedEncodingException {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/groovyx/net/http/HttpURLClient.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public HttpResponseDecorator request( Map<String,?> args )
if ( arg != null ) { // if there is a request POST or PUT body
conn.setDoOutput( true );
final HttpEntity body = (HttpEntity)encoderRegistry.getAt(
requestContentType ).call( arg );
requestContentType ).call( arg, requestContentType );
// TODO configurable request charset

//TODO don't override if there is a 'content-type' in the headers list
Expand Down

0 comments on commit 7418e6e

Please sign in to comment.