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 8220995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:44:39+00:00 2026-06-07T13:44:39+00:00

blahNow I am doing an ANdroid application.In my app I have to login using

  • 0

blahNow I am doing an ANdroid application.In my app I have to login using a url.Just like…www.blah.com/api/login/username/password.

private void sendAccelerationData()
{
    ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(7);
    nameValuePairs.add(new BasicNameValuePair("","test3"));
    nameValuePairs.add(new BasicNameValuePair("","pass3"));
    this.sendData(nameValuePairs);
}

private void sendData(ArrayList<NameValuePair> data)
{
    try
    {
        HttpClient httpclient = new DefaultHttpClient();
        HttpPost httppost = new      
        HttpPost("http://blah.com/api/login/");
        httppost.setEntity(new UrlEncodedFormEntity(data));
        HttpResponse response = httpclient.execute(httppost);
    }
}

but I am getting 404 error.and if i write my sendData() like

HttpPost("http://eesnap.com");

and sendAccelerationData() like

nameValuePairs.add(new BasicNameValuePair("","api"));
nameValuePairs.add(new BasicNameValuePair("","login"));
nameValuePairs.add(new BasicNameValuePair("","test3"));
nameValuePairs.add(new BasicNameValuePair("","pass3"));

I am getting 200 success.
If post http://www.blah.com/api/login/username/password on brower then I am getting a result on the browser

  • 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-06-07T13:44:41+00:00Added an answer on June 7, 2026 at 1:44 pm

    I understand my error.In ‘Get()’ method i can write code like above but in post method I have to use name value pair.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text file which looks like this: blah blah foo1 bar1 foo1
Here's my situation I have numerous SQL rows like the following. SET IDENTITY_INSERT blah
Good afternoon I have a table that has customer id, name, computer, laptop, blah,
In my DAL I write queries like this: using(SQLConnection conn = connection string here)
So, I've got a native vc++ application that we currently have stored in TFS2010
I am using the Authorize attribute like this: [Authorize (Roles=Admin, User)] Public ActionResult Index(int
Ok, I have a question relating to an issue I've previously had. I know
Just starting to learn some basic C and messing around with the stat() system
I currently have an ageing subversion 1.4.2 server with multiple repos that I want
I'm creating unit tests for a Windows Forms application. One of my methods is

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.