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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:53:38+00:00 2026-05-27T05:53:38+00:00

I answered the following question : not getting response response = httpclient.execute(request); See my

  • 0

I answered the following question :

not getting response response = httpclient.execute(request);

See my answer there.Then I got a comment on my answer from
Peterdk

as :

The response is not a HtppResponse but a String. Or how do you get it
to be a HttpResponse? Does this depend on the ResponseHandler?

Now i have a doubt “Is HttpResponse a String ?”

Please help me clear my this doubt and explain me what was wrong in my concept.

  • 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-27T05:53:39+00:00Added an answer on May 27, 2026 at 5:53 am

    That comment on your answer makes no sense at all to me. I also have no idea why you were down-voted, though really I don’t think the question was worded well enough to be properly answered, but if you’re really in doubt with something like this you can think through it logically by checking the docs.

    Short answer:

    HttpResponse is not a String.

    Long answer:

    The documentation for HttpClient.execute(string) shows this as the method signature:

    public abstract HttpResponse execute (HttpUriRequest request)
    

    So clearly execute returns you an HttpResponse.

    Now if you go to the docs for HttpResponse you find that HttpResponse is an interface and includes methods such as the method you used in your answer: getStatusLine(). Immediately you know that an interface isn’t a String, so HttpResponse isn’t a String, but in case you might think it’s the other way and maybe String implements HttpResponse, it should be fairly obvious that String doesn’t have a method called getStatusLine() and that it’d be ridiculous for something as generic as a String to implement an interface to do with HTTP. If you really want to be sure, you can check the docs again and see that String doesn’t have getStatusLine() and doesn’t implement the interface HttpResponse.

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

Sidebar

Related Questions

I had a question answered which raised another one, why following does not work?
[Meta notes: the following question is not answered, but the problem that the question
I've got a form with questions which gets answered. Then on the following page
An earlier question was answered about getting the OrderID and the number of associated
I was asked in an interview this question so I answered with the following:
This question is related to following thread. Prism RegionAdapter - Removing then Adding View
I'm not sure if this question has been answered in full or if my
I recently attended an interview and was asked the following question. There are two
Following on from my previous question , which was so quickly answered by Meder
OLD QUESTION (Already answered by Mark - The answer is to use getTag()): Let's

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.