Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

http post method passing null values to the server

http post method passing null values to the server  using -'android,http'


            url= new URL(ConstantsClass.VENDOR_FOLLOW + "?UID=" +android_id+"&URL='"+resultfinal+"'&device=android");

                connection = (HttpURLConnection) url.openConnection();

                request = new OutputStreamWriter(connection.getOutputStream());

                String line = "";
                InputStreamReader isr = new InputStreamReader(connection.getInputStream());
                BufferedReader reader = new BufferedReader(isr);

                StringBuffer sb = new StringBuffer();

                while((line=reader.readLine())!=null) {
                    sb.append(line + "&");

                response = sb.toString();

                Log.i("Test", "updated response: " + response);

         catch (IOException e) {

            Log.i("Test", "**************url list********************" + url);
         tag_text.setOnClickListener(new OnClickListener() {
                public void onClick(View v) {
                    // TODO Auto-generated method stub
                    Intent in=new Intent(context,LinkWebView.class);
                    in.putExtra("vendorUrl", resultfinal);

    return view;


Hi i am new to android and I am trying to pass values from the url to the server but i am getting null values passed on the server side. Update response is giving null. My server side values dont give any values to me. I need to pass the url, android_id and device from the url that is given above. I tried the httpclient also but it gives me null values in that as well.

asked Sep 24, 2015 by maurya
0 votes

Related Hot Questions

Government Jobs Opening