aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-04-17 14:00:25 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-04-17 14:00:25 +0200
commit1b8a1fcec857103cc38bab429eca8ad6abecdbe5 (patch)
treed269c94463090e510e86b88d5975cb9c235fdd5b /main/src
parentfcf6784a9bbb8bf8607e09e75408302fbb31252c (diff)
downloadcgeo-1b8a1fcec857103cc38bab429eca8ad6abecdbe5.zip
cgeo-1b8a1fcec857103cc38bab429eca8ad6abecdbe5.tar.gz
cgeo-1b8a1fcec857103cc38bab429eca8ad6abecdbe5.tar.bz2
Refactoring: use Parameters as a type
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/network/Network.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/network/Network.java b/main/src/cgeo/geocaching/network/Network.java
index 75cad33..07cd0e5 100644
--- a/main/src/cgeo/geocaching/network/Network.java
+++ b/main/src/cgeo/geocaching/network/Network.java
@@ -43,7 +43,6 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
-import java.util.List;
import java.util.zip.GZIPInputStream;
@@ -171,15 +170,15 @@ public abstract class Network {
* @param params
* @return
*/
- public static HttpResponse postRequest(final String uri, final List<? extends NameValuePair> params) {
+ public static HttpResponse postRequest(final String uri, final Parameters params) {
try {
- HttpPost request = new HttpPost(uri);
+ final HttpPost request = new HttpPost(uri);
if (params != null) {
request.setEntity(new UrlEncodedFormEntity(params, HTTP.UTF_8));
}
request.setHeader("X-Requested-With", "XMLHttpRequest");
return Network.request(request);
- } catch (Exception e) {
+ } catch (final Exception e) {
// Can be UnsupportedEncodingException, ClientProtocolException or IOException
Log.e("postRequest", e);
return null;