Net.HttpLayer
Definitions
def bytesToString(v: Vector[Int8]): String
SourceDecodes the byte vector v as a UTF-8 string.
def doRequest(defaultClient: java.net.http.HttpClient, req: HttpRequest): Result[IoError, HttpResponse] \ IO
SourcePerforms the actual HTTP request using the Java HTTP client.
Reuses defaultClient when the request has default client-level settings
(connectTimeout == None and followRedirects == true).
Otherwise, builds a one-off client with the request's specific settings.
def execute(validate: HttpRequest -> Result[IoError, Unit], defaultClient: java.net.http.HttpClient, req: HttpRequest): Result[IoError, HttpResponse] \ IO
SourceValidates then performs an HTTP request.
def newDefaultClient(): java.net.http.HttpClient \ IO
SourceBuilds a default HttpClient with Redirect.NORMAL and no connect timeout.
def sleep(ms: Int64): Unit \ IO
SourceSleeps the current thread for ms milliseconds.
def stringToBytes(s: String): Vector[Int8]
SourceEncodes the string s as a UTF-8 byte vector.
def urlEncode(s: String): String
SourceReturns the URL-encoded form of the string s.