Reputation: 4595
I have the following code that I would like to transform into a simple single URL so that (possibly) I can use Picasso for downloading images:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(Constants.GET_OTHER_PROFILE_PICTURE_URL);
nameValuePairs.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
UrlEncodedFormEntity form = new UrlEncodedFormEntity(nameValuePairs);
httppost.setEntity(form);
Upvotes: 0
Views: 65
Reputation: 23597
With a GET requests the parameters can be declared in the url like
<url>?<entry.getKey>=<entry.getValue>
The same parameters (as key value pairs separated by a colon) are passed to a POST request through the body.
Upvotes: 1