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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:52:47+00:00 2026-06-13T13:52:47+00:00

How can I get the process percentage of a HTTP request? I’ve got this

  • 0

How can I get the process percentage of a HTTP request?
I’ve got this code for the request:

    HttpClient requestclient = new DefaultHttpClient();
    HttpResponse requestresponse = requestclient.execute(new HttpGet("example.com"));
    StatusLine requeststatus = requestresponse.getStatusLine();
    if(requeststatus.getStatusCode() == HttpStatus.SC_OK){
        ByteArrayOutputStream requestoutput = new ByteArrayOutputStream();
        requestresponse.getEntity().writeTo(requestoutput);
        requestoutput.close();
        String requestresult = requestoutput.toString();
        return requestresult;
    } else{.
        requestresponse.getEntity().getContent().close();
        throw new IOException(requeststatus.getReasonPhrase());
    }

Thanks!

  • 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-13T13:52:48+00:00Added an answer on June 13, 2026 at 1:52 pm

    HTTP requests should be run either in an IntentService or AsyncTask. That is, always run them in the background.

    AsyncTask has methods for displaying the percentage complete: publishProgress() from doInBackground(), and onProgressUpdate() in the main Activity.

    An IntentService can show progress by broadcast Intents back to the Activity, or by running a progressBar, or (in JellyBean and later) by using a progress notification.

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

Sidebar

Related Questions

This is basic stuff but I can't get this following form to process reliably.
I have a view that can take several seconds to process a GET request
How we can get this process with this condition??schema of process? int main (int
What details can I get of the process hosting my ASP.NET code (i.e. Cassini,
How can i Get process Cpu usage in c?? I need Cpu usage of
How can i get a process by know process name on mac os?
How I can get ring 0 operating mode for my process in Windows 7(or
How can I get the return value of a process? Basically I'm ** ShellExecute
How can I get the PID of a TERMINAL running a process with given
How can I get a process' ID? I require the ID in order to

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.