What is the good way to Get Response content by HttpMethodBase:getResponseBodyAsStream

View: New views
1 Messages — Rating Filter:   Alert me  

What is the good way to Get Response content by HttpMethodBase:getResponseBodyAsStream

by Bon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear all,

    I'm new with HttpClient,
    now I have a problem about to get the response content by HttpMethodBase:getResponseAsStream,
    sometimes I can not finish to get the content (always the image files), and I don't understand why?
    The program was still running and not terminated for 12-20 hrs,
    and I've find the program stuck in reading the response data,
    I don't understand why no throws IOException when the process was running over 12-20 hrs?!
    then I guess maybe I should using the getResponseAsStream be carefully for different content format,
    but I'm not sure what is good (InputStream) for getting image content?

    or there are some other reasons about my problem.

Best Regards,
Bon