Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Default config for server tests. Short lingering timeout, no Date header.
Equations
- Std.Http.Internal.Test.defaultConfig = { lingeringTimeout := 1000, generateDate := false }
Instances For
Run tests and wrap any failure message with the group name.
Use as #eval runGroup "Topic" do ....
Equations
Instances For
Create a fresh mock connection, send raw, and run assertions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Like check but closes the client channel before running the server.
Use for tests involving truncated input or silent-close (EOF-triggered behavior).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Like check wrapped in a wall-clock timeout.
Required when the test involves streaming, async timers, or keep-alive behavior.
Equations
- Std.Http.Internal.Test.checkTimed name ms raw handler expect config = Std.Http.Internal.Test.withTimeout✝ name ms (Std.Http.Internal.Test.check name raw handler expect config)
Instances For
Assert the response is byte-for-byte equal to expected.
Use sparingly — prefer assertStatus + assertContains for 200 responses.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Std.Http.Internal.Test.r400 = "HTTP/1.1 400 Bad Request\x0d\nServer: LeanHTTP/1.1\x0d\nConnection: close\x0d\nContent-Length: 0\x0d\n\x0d\n"
Instances For
Equations
- Std.Http.Internal.Test.r408 = "HTTP/1.1 408 Request Timeout\x0d\nServer: LeanHTTP/1.1\x0d\nConnection: close\x0d\nContent-Length: 0\x0d\n\x0d\n"
Instances For
Equations
- Std.Http.Internal.Test.r413 = "HTTP/1.1 413 Content Too Large\x0d\nServer: LeanHTTP/1.1\x0d\nConnection: close\x0d\nContent-Length: 0\x0d\n\x0d\n"
Instances For
Equations
- Std.Http.Internal.Test.r417 = "HTTP/1.1 417 Expectation Failed\x0d\nServer: LeanHTTP/1.1\x0d\nConnection: close\x0d\nContent-Length: 0\x0d\n\x0d\n"
Instances For
Equations
- Std.Http.Internal.Test.r431 = "HTTP/1.1 431 Request Header Fields Too Large\x0d\nServer: LeanHTTP/1.1\x0d\nConnection: close\x0d\nContent-Length: 0\x0d\n\x0d\n"
Instances For
Equations
- Std.Http.Internal.Test.r505 = "HTTP/1.1 505 HTTP Version Not Supported\x0d\nServer: LeanHTTP/1.1\x0d\nConnection: close\x0d\nContent-Length: 0\x0d\n\x0d\n"
Instances For
Always respond 200 "ok" without reading the request body.
Equations
- Std.Http.Internal.Test.okHandler x✝ = do let a ← liftM (Std.Http.Response.ok.text "ok") pure { line := a.line, body := Std.Http.Body.Any.ofBody a.body, extensions := a.extensions }
Instances For
Read the full request body and echo it back as text/plain.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Respond 200 with the request URI as the body.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Minimal GET request. extra is appended as raw header lines (each ending with \x0d\n)
before the blank line.
Equations
Instances For
GET with Connection: close.
Equations
- Std.Http.Internal.Test.mkGetClose path = Std.Http.Internal.Test.mkGet path "Connection: close\x0d\n"
Instances For
POST with a fixed Content-Length body. extra is appended before the blank line.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Format a single chunk: <hex-size>\x0d\n<data>\x0d\n.
Equations
- Std.Http.Internal.Test.chunk data = toString (String.ofList (Nat.toDigits 16 data.toUTF8.size)) ++ toString "\x0d\n" ++ toString data ++ toString "\x0d\n"
Instances For
The terminal zero-chunk that ends a chunked body.
Equations
- Std.Http.Internal.Test.chunkEnd = "0\x0d\n\x0d\n"