aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/network
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-06-17 07:08:33 +0200
committerSamuel Tardieu <sam@rfc1149.net>2012-06-17 07:11:22 +0200
commitee17c22f41cff696218c878a0c426d1e7dd85497 (patch)
tree01d565e21731b876ef858560b6d51ee60c5f1702 /main/src/cgeo/geocaching/network
parent16f8ce395dbadbb4f1ff15b529d3a4280d45777e (diff)
downloadcgeo-ee17c22f41cff696218c878a0c426d1e7dd85497.zip
cgeo-ee17c22f41cff696218c878a0c426d1e7dd85497.tar.gz
cgeo-ee17c22f41cff696218c878a0c426d1e7dd85497.tar.bz2
Fix #1751: set language to English
Using a simpler page and putting a referer seems to make the process more reliable.
Diffstat (limited to 'main/src/cgeo/geocaching/network')
-rw-r--r--main/src/cgeo/geocaching/network/Network.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/network/Network.java b/main/src/cgeo/geocaching/network/Network.java
index c73dd30..5911146 100644
--- a/main/src/cgeo/geocaching/network/Network.java
+++ b/main/src/cgeo/geocaching/network/Network.java
@@ -136,6 +136,18 @@ public abstract class Network {
}
/**
+ * POST HTTP request
+ *
+ * @param uri the URI to request
+ * @param params the parameters to add to the POST request
+ * @params headers the headers to add to the request
+ * @return the HTTP response, or null in case of an encoding error params
+ */
+ public static HttpResponse postRequest(final String uri, final Parameters params, final Parameters headers) {
+ return request("POST", uri, params, headers, null);
+ }
+
+ /**
* Multipart POST HTTP request
*
* @param uri the URI to request
@@ -173,9 +185,9 @@ public abstract class Network {
* @param uri
* the URI to request
* @param params
- * the parameters to add the the GET request
+ * the parameters to add to the URI
* @param headers
- * the headers to add to the GET request
+ * the headers to add to the request
* @param cacheFile
* the cache file used to cache this query
* @return the HTTP response, or null in case of an encoding error in a POST request arguments