http post - Passing values to server by HttpPost Android -


i trying post values server http post method getting error:

org.apache.http.client.httpresponseexception: not found  detail message - not found 

i using keyvalue pair method send values, please hep me in this, appreciated.

code - httpparams httpparams = new basichttpparams();

httpconnectionparams.setconnectiontimeout(httpparams, 1000); httpconnectionparams.setsotimeout(httpparams, 1000); httpparams p = new basichttpparams(); httpclient httpclient = new defaulthttpclient(p); string url = "myurl"; httppost httppost = new httppost(url); try { list<namevaluepair> namevaluepairs = new arraylist<namevaluepair>(                         7); namevaluepairs.add(new basicnamevaluepair("username",                         "test")); namevaluepairs.add(new basicnamevaluepair("password",                         "ramos")); namevaluepairs.add(new basicnamevaluepair("fullname",                         "mark")); namevaluepairs.add(new basicnamevaluepair("email",                         "yyy@gmail.com")); namevaluepairs.add(new basicnamevaluepair("mobile_prefix",                         "91")); namevaluepairs.add(new basicnamevaluepair("mobile_suffix",                         "1234567890")); namevaluepairs.add(new basicnamevaluepair("mode", "app")); httppost.setentity(new urlencodedformentity(namevaluepairs)); responsehandler<string> responsehandler = new basicresponsehandler(); string responsebody = httpclient.execute(httppost,                         responsehandler); 

thanks


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -