Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6812801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:29:37+00:00 2026-05-26T20:29:37+00:00

The code : private boolean callHttpPost() { boolean retVal = false; HttpClient httpclient =

  • 0

The code :

private boolean callHttpPost()
{
boolean retVal = false; 

HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://www.yoursite.com/script.php");

try 
    {
        List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
        nameValuePairs.add(new BasicNameValuePair("id", "12345"));
        nameValuePairs.add(new BasicNameValuePair("stringdata", "AndDev is Cool!"));
        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

        HttpResponse response = httpclient.execute(httppost);

    } 
          catch (ClientProtocolException e) 
          {
        // TODO Auto-generated catch block
    } 
          catch (IOException e) 
          {
        // TODO Auto-generated catch block
    }
}

I get to the IOException all the time i call this method – and i dont know why.
The IOException e is empty – so i can’t see actually what is the exception i get.

I checked with Fiddler application that this http/post work with those parameters – and its look ok

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:29:38+00:00Added an answer on May 26, 2026 at 8:29 pm
    <manifest 
      <uses-permission android:name="android.permission.INTERNET" />
      <uses-sdk ..
      <application...
      </application>
    </manifest>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This isn't valid code: public class MyClass { private static boolean yesNo = false;
my code : private AtomicBoolean fetched1 = new AtomicBoolean(false); private int rowCount; public int
Given the following code: public class SomeClass { private boolean shouldBlock = false; private
This is what my code currently looks like: private boolean[] isInitialized = new boolean[COUNT];
Consider the following block of code: class CheckStore { private String displayText; private boolean
I wrote the following code: import java.lang.*; import DB.*; private Boolean validateInvoice(String i) {
this is my code private void sendToClient(Dictionary<string, string> reportDic) { Response.Clear(); Response.BufferOutput = false;
I have the following code private Map<KEY, Object> values = new HashMap<KEY, Object>(); public
I am using this code to check for the internet connection: private boolean checkInternetConnection()
I have this code : private void insertValus() { ContentValues initialValues = new ContentValues();

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.