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

  • Home
  • SEARCH
  • 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 8996501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:45:47+00:00 2026-06-15T23:45:47+00:00

I am using android-async-http and really liking it. I’ve run into a problem with

  • 0

I am using android-async-http and really liking it. I’ve run into a problem with POSTing data. I have to post data to the API in the following format: –

<request>
  <notes>Test api support</notes>
  <hours>3</hours>
  <project_id type="integer">3</project_id>
  <task_id type="integer">14</task_id>
  <spent_at type="date">Tue, 17 Oct 2006</spent_at>
</request>

As per the documentation, I tried doing it using RequestParams, but it is failing. Is this any other way to do it? I can POST equivalent JSON too. Any ideas?

  • 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-15T23:45:48+00:00Added an answer on June 15, 2026 at 11:45 pm

    Loopj POST examples – extended from their Twitter example:

    private static AsyncHttpClient client = new AsyncHttpClient();
    

    To post normally via RequestParams:

    RequestParams params = new RequestParams();
    params.put("notes", "Test api support"); 
    client.post(restApiUrl, params, responseHandler);
    

    To post JSON:

    JSONObject jsonParams = new JSONObject();
    jsonParams.put("notes", "Test api support");
    StringEntity entity = new StringEntity(jsonParams.toString());
    client.post(context, restApiUrl, entity, "application/json",
        responseHandler);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the AsyncHttpClient library from http://loopj.com/android-async-http/ and have it calling web services fine
I get a small problem: I need using async task in cocos2d-x on Android.
in my Service I am using http://loopj.com/android-async-http/ within the doInBackground() method of a service.
I'm using Android and Google Maps at API level 10, and I get latitude
I am using android 2.1 platform.The code I have will display the Name number
I am using Android 2.1 platform, I have 7 contacts in my emulator when
I have just started using android, and have about 5 layout files finished. However,
I currently using android NDK to write some native code in C. I have
I'm using a chart taken from here http://writerbay.wordpress.com/2011/03/12/android-tutorial-displaying-chart-on-android/#comment-54 to draw a graph in android.
I am using Eclipse to develop an Android application that plots Bluetooth data. I

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.