Is there a way to know mobile device if http post request was done programmatically.
E.g. on my android Im doing the following thing:
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
nameValuePairs.add(new BasicNameValuePair("login", "12312"));
nameValuePairs.add(new BasicNameValuePair("password", "234"));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
Is there a way to know that it was a andriod device that sent this request? I understand I can send additional data here to identify the device. The question is: if post request was done this way is there a way to understand that it was done from andriod device (like by using UserAgent)?
Server that accepts the requests is written in asp.net mvc.
Use “User-Agent” HTTP header, however it can be spoofed or not set at all, although all modern browser implement this header. Some useful info can be found on Wiki