send

abstract fun send(request: Request): Response

Synchronously sends an HTTP request to the server, and awaits the response.

Return

The HTTP status, headers, and body that the server sent in response.

Parameters

request

The HTTP method, URL, headers, and (optional) body to send to the server.

Throws

me.nullicorn.msmca.http.HttpException

if the connection fails, or if the server sends a malformed response.