tags:

views:

330

answers:

0

The documentation (copied below) doesn't say a lot about what IOException and HttpException means in its context.

My question is: after an IOException occurs in a HttpClient.execute(HttpMethod) method, do I have to discard the object and create a new HttpClient in order to execute methods again? Or is it still usable (the HttpClient object) to execute methods after some of these exceptions occur?

executeMethod

public int executeMethod(HttpMethod method)
                  throws IOException,
                         HttpException
Executes the given HTTP method.
Parameters:
method - the HTTP method to execute.
Returns:
the method's response code
Throws:
IOException - If an I/O (transport) error occurs. Some transport exceptions can be recovered from.
HttpException - If a protocol exception occurs. Usually protocol exceptions cannot be recovered from.

related questions