diff options
| author | Jesse Morgan <jesse@jesterpm.net> | 2016-03-27 13:42:56 -0700 | 
|---|---|---|
| committer | Jesse Morgan <jesse@jesterpm.net> | 2016-03-27 13:42:56 -0700 | 
| commit | 7367968483e4ddfedfa47598c508b343b44fc852 (patch) | |
| tree | 8aeb5a96503ddde465b41b58ebefe40da9e57760 /src/main | |
| parent | 6d987e0dd18ef830484641166a816661f4b16074 (diff) | |
Setting content-type on POST requests.
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/java/com/p4square/ccbapi/ApacheHttpClientImpl.java | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/src/main/java/com/p4square/ccbapi/ApacheHttpClientImpl.java b/src/main/java/com/p4square/ccbapi/ApacheHttpClientImpl.java index 4c3a777..957a69d 100644 --- a/src/main/java/com/p4square/ccbapi/ApacheHttpClientImpl.java +++ b/src/main/java/com/p4square/ccbapi/ApacheHttpClientImpl.java @@ -59,7 +59,9 @@ public class ApacheHttpClientImpl implements HTTPInterface {          final HttpPost httpPost = new HttpPost(uri);          if (form != null) { -            httpPost.setEntity(new ByteArrayEntity(form)); +            final ByteArrayEntity entity = new ByteArrayEntity(form); +            entity.setContentType("application/x-www-form-urlencoded"); +            httpPost.setEntity(entity);          }          // Make the request. | 
