diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-05-01 15:14:34 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2014-05-01 15:14:34 +0200 |
commit | 69fec2b8561010b6d352a30a25914ab12fc27af0 (patch) | |
tree | 05adbd8ce3d01d8a2f8b2890502f2695df3b1d00 /src/io/OAuthRequester.java | |
parent | eda2701672851c54c6b6f2fe0b81d9785bbc1690 (diff) | |
download | TwitterDataAnalytics-69fec2b8561010b6d352a30a25914ab12fc27af0.tar.gz |
Fix signing for OAuth POST messages, fix search param
Diffstat (limited to 'src/io/OAuthRequester.java')
-rw-r--r-- | src/io/OAuthRequester.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/io/OAuthRequester.java b/src/io/OAuthRequester.java index 77c41c0..c3538ee 100644 --- a/src/io/OAuthRequester.java +++ b/src/io/OAuthRequester.java @@ -101,14 +101,16 @@ public class OAuthRequester extends AbstractRequester { * Signs a HTTP request. * * @param conn An open HTTP connection with data ready to be sent. + * @param postData The same that got written to the output stream. * @throws OAuthMessageSignerException * @throws OAuthExpectationFailedException * @throws OAuthCommunicationException */ - public void sign(HttpURLConnection conn) throws OAuthMessageSignerException, - OAuthExpectationFailedException, OAuthCommunicationException { + public void sign(HttpURLConnection conn, String postData) throws + OAuthMessageSignerException, OAuthExpectationFailedException, + OAuthCommunicationException { HttpURLConnectionRequestAdapter request; - request = new HttpURLConnectionRequestAdapter(conn); + request = new HttpURLConnectionPostRequestAdapter(conn, postData); consumer.sign(request); } |