T
Tom Forsmo
Does anybody know if its possible to set a timeout value when using URL
to read a simple http request?
I know URL uses the URLStreamHandler class to represents the different
protocols, such as HTTP, that URL uses to perform the particular
protocol operations, but I can not figure out if there is a way to set a
timeout on the operation. I am not sure if there is an actual way in
HTTP to set a timeout, but in that case its just as easy for URL to just
close the connection if no reply has been received in X seconds.
Any hints?
tom
to read a simple http request?
I know URL uses the URLStreamHandler class to represents the different
protocols, such as HTTP, that URL uses to perform the particular
protocol operations, but I can not figure out if there is a way to set a
timeout on the operation. I am not sure if there is an actual way in
HTTP to set a timeout, but in that case its just as easy for URL to just
close the connection if no reply has been received in X seconds.
Any hints?
tom