Send a HTTP request and return the server's response.
You must have a valid host before sending a request (see setHost). Any
missing mandatory header field in the request will be added with an
appropriate value. Warning: this function waits for the server's response
and may not return instantly; use a thread if you don't want to block
your application, or use a timeout to limit the time to wait. A value of
Duration.Zero means that the client will use the system defaut timeout
(which is usually pretty long).
Send a HTTP request and return the server's response.
You must have a valid host before sending a request (see setHost). Any missing mandatory header field in the request will be added with an appropriate value. Warning: this function waits for the server's response and may not return instantly; use a thread if you don't want to block your application, or use a timeout to limit the time to wait. A value of Duration.Zero means that the client will use the system defaut timeout (which is usually pretty long).