Very nice news,
so the method blocks because with PHP I don't write a correct html page
but only some strings...
If I create an html page with head and body it stops blocking...
Now I try...
Thank you very much.
Bye
Oleg Kalnichevski wrote:
Alfredo Marchini wrote:
Hi all,
I need to find a solution for calling httpclient.executeMethod in
non-blocking mode, so I can retrieve data with
getResponseBodyAsStream() without waiting for the end of the execution
of the method.
HttpClient#executeMethod returns _immediately_ after having received a
response head (that is, a status line and response headers). It does
_not_ attempt to read the response body.
The scenario is the following:
I write in PHP a page that with flush method output some strings that I
need to capture while the page are downloading.
I write in Java this code:
httpClient.executeMethod(method);
BufferedReader reader = new BufferedReader(new
InputStreamReader(method.getResponseBodyAsStream()));
String line = null;
while((line = reader.readLine()) != null) {
System.out.println(line);
}
This code does not resolve my problem, because the executeMethod blocks
until all data is downloaded.
This is incorrect.
Oleg
I need that executeMethod don't block, so I can retrieve output while
executeMethod capture it.
Is there a way to do this?
Thank you very much.
Alfredo
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Alfredo Marchini
Consulente IT
P.IVA: 05649240487
CF: MRCLRD81R07D612B
Via di Ripoli, 22
50126 Firenze (FI)
Tel. +39 393 9566375
E-Mail: [email protected]
PEC: [email protected]
Web: http://www.alfredomarchini.it
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]