handle the exceptino of httlp client connection with server
and functionalize of send request