Note that there are some explanatory texts on larger screens.

plurals
  1. POMimicing a browsers HTTP post request, strange format
    text
    copied!<p>Hey, I'm working on an app for my final year project in college and something I'm struggling with is trying to use the default http client to mimic the below post, as it seems different in format to the others I have seen. The code I'm using it similar to this and has been successful at logging onto the site:</p> <pre><code>HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://www.myurl.com/app/page.php"); // Add your data List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(5); nameValuePairs.add(new BasicNameValuePair("type", "20")); nameValuePairs.add(new BasicNameValuePair("mob", "919895865899")); nameValuePairs.add(new BasicNameValuePair("pack", "0")); nameValuePairs.add(new BasicNameValuePair("exchk", "1")); try { httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); Log.d("myapp", "works till here. 2"); try { HttpResponse response = httpclient.execute(httppost); Log.d("myapp", "response " + response.getEntity()); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } </code></pre> <p>However, I'm struggling to distinguish parameters and their values from the below post and am unsure of the purpose of the number 8743499427392. Any help would be much appreciated:</p> <p>(part of the post from Http Live Headers)</p> <pre><code>http://messaging.o2online.ie/con_save.osp POST /con_save.osp -----------------------------8743499427392 Content-Disposition: form-data; name="EContactID" -1^ -----------------------------8743499427392 Content-Disposition: form-data; name="EContactIDList" -----------------------------8743499427392 Content-Disposition: form-data; name="Categories" Synch; -----------------------------8743499427392 Content-Disposition: form-data; name="ENickName" Test Colm Test Shannon -----------------------------8743499427392 Content-Disposition: form-data; name="EAtt1"; filename="" Content-Type: application/octet-stream -----------------------------8743499427392 Content-Disposition: form-data; name="EPMobile" 0868617541 -----------------------------8743499427392 Content-Disposition: form-data; name="EMobile" -----------------------------8743499427392-- </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload