bend-kit-http Releases (48): 0.38.2.0 0x8d023d286743ed45e417bf6c88051634 indexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.38.2.0 0.38.1.1 0xaa3296528912419efb41db94c459a432 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.38.1.1 0.38.1.0 0x5c2aff493cbb85be4373637bf403b4f6 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.38.1.0 0.38.0.0 0xc449005ecd00a8a4768cabe7f5299155 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.38.0.0 0.37.0.0 0x265587931b0e0a1f1865db2e6abf2461 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.37.0.0 0.36.1.0 0x1bc703ea4a56a6a52e1e55a730d0f693 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.36.1.0 0.36.0.1 0x89ee5caa98a5bc518a443a0b698cdac3 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.36.0.1 0.36.0.0 0xbd1b4cc5d2844d9d24fe4ccd14752506 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.36.0.0 0.35.0.0 0x225c6e243c729ffdd50511c43665551f unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.35.0.0 0.34.0.0 0x2284b91a0ad33d2e9589c2d3c7d27a32 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.34.0.0 0.33.0.0 0x579a2e74e2404c33b1f6717868c087e4 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.33.0.0 0.32.0.0 0x6a946b742ab6f76f0ba5b90b14da52ad unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.32.0.0 0.31.1.1 0x2e887b111254ebeda241142c95189a31 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.31.1.1 0.31.1.0 0x65535b2ba8933ce9a1b2c0a16f1330ae unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.31.1.0 0.31.0.0 0x843c555e26e0ef1c58ea08f02bf26712 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.31.0.0 0.30.0.0 0x8bc87dd4d1e610fe1bf336b567537a8c unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.30.0.0 0.29.0.0 0x8c8d90d5c08f57bf4aa756aa551bd63c unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.29.0.0 0.28.0.0 0x66f3e61148842acfb1374b9040cdf1b8 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.28.0.0 0.27.0.0 0x28f53dfe9eb8ab6c7c06dbc7bdee1b69 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.27.0.0 0.26.0.0 0xb65f13a70d5efb22a09a5b9d69148c23 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.26.0.0 0.25.0.2 0x2ef00d214bb4173160420b61a1472572 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.25.0.2 0.25.0.1 0xdbefba4875a726b49118a0ec83afc964 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.25.0.1 0.25.0.0 0xc1ce760a7737ff31b4b93bf42cd84df4 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.25.0.0 0.24.3.1 0xbe856e58d5945b576b346fb6fd02e35f unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.24.3.1 0.24.3.0 0x1905c71d1492d7d2058cf0b623ad081b unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.24.3.0 0.24.2.0 0x9b0217f4c270a124e6d893f6c41a846f unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.24.2.0 0.24.1.0 0x1d5605edcef70ed802e46a3b54cc3ef5 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.24.1.0 0.24.0.0 0x0d62a3de3185f1d2ea6e8581f3b071f9 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.24.0.0 0.23.0.1 0x1cef8a5fb1d9142ca5c6b2cb43629b21 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.23.0.1 0.23.0.0 0x1740b4cccbf04f08e5cfe2c185e62489 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.23.0.0 0.22.0.0 0x141c738a983c7ae3f35a5401f546168e unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.22.0.0 0.21.1.0 0x6e164bee126294990dbcf93b981cb684 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.21.1.0 0.21.0.0 0x4b67d78fa90357e088202707c263401c unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.21.0.0 0.20.1.0 0xc08d4d9781d7c7b9ddadc591c40f407e unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.20.1.0 0.20.0.0 0x942157943655d6226602bfa15f1ffe5b unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.20.0.0 0.19.1.0 0x2fff1c3ba80ac1fb7c53c4a9d97ebb5a unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.19.1.0 0.19.0.0 0x67572df91180fbe0086268e9741e512e unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.19.0.0 0.18.1.0 0x4fa754ce7474d53824c1fa96e1909b46 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.18.1.0 0.18.0.0 0x2e0a62e60a7680548f56d3f4e5821f37 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.18.0.0 0.17.0.0 0x927f59d97432036049d79dc1f6f5db06 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.17.0.0 0.16.0.0 0xa32ae93500a5dfaef6edb45d6e7bcc3b unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.16.0.0 0.15.0.5 0xe2e828b46585a523091ea59e50bff494 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.15.0.5 0.15.0.4 0x8a66b9708c43d13d24a12fc9e9d76f69 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.15.0.4 0.15.0.3 0xbf27a4a8ac7865535426a7da95de418f unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.15.0.3 0.15.0.1 0x00b25beeb5f3d0fd48e0c335c5999e89 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.15.0.1 0.15.0.0 0x99674294dda9fcad3d3e64a42002e3f7 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.15.0.0 0.14.0.1 0x675b00007c6529c96bc50fe604cbdba2 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.14.0.1 0.14.0.0 0x310b0480ce5b511ff8da9704b3d27ef3 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-http@0.14.0.0 Definitions (1026, 1 to 100 shown): Admission.Counts (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=Counts) type Counts is Data: Counts{connections: U32, active: U32, buffered: U32, connection_high: U32, active_high: U32, buffered_high: U32, connection_rejected: Nat, active_rejected: Nat, buffered_rejected: Nat} Admission.Caps (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=Caps) type Caps is Data: Caps{connections: U32, active: U32, buffered: U32} Admission.Command (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=Command) type Command is Data: Acquire{kind: U32, reply: Chan(Bool)} Release{kind: U32, reply: Chan(Unit)} Snapshot{reply: Chan(Counts)} Quiesce{reply: Chan(Bool)} Running{reply: Chan(Bool)} Stop{} Admission.Lease (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=Lease) # One transport resource: its pool, and every lease taken from it joined in one grant. type Lease is Type: Lease{pool: Res.Pool, held: Res.Grant} Admission.Marks (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=Marks) type Marks is Data: Marks{connection_high: U32, active_high: U32, buffered_high: U32, connection_rejected: Nat, active_rejected: Nat, buffered_rejected: Nat} Admission.Ledger (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=Ledger) type Ledger is Type: Ledger{connections: Lease, active: Lease, buffered: Lease, marks: Marks} Admission.Booked (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=Booked) # Broken means a lease count is wrong, such as a give with no matching take. type Booked is Type: Booked{ledger: Ledger, admitted: Bool} Broken{} Admission.Taken (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=Taken) type Taken is Type: Admitted{lease: Lease} Full{lease: Lease} Lost{} Admission.lease.open (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=lease.open) def lease.open(+owner: Nat, capacity: U32) -> Lease: Admission.ledger.open (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=ledger.open) def ledger.open(caps: Caps) -> Ledger: Admission.lease.joined (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=lease.joined) def lease.joined(combined: Res.Combine, pool: Res.Pool) -> Taken: Admission.lease.took (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=lease.took) def lease.took(reserved: Res.Reserve, held: Res.Grant) -> Taken: Admission.lease.take (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=lease.take) def lease.take(lease: Lease) -> Taken: Admission.lease.released (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=lease.released) def lease.released(released: Res.Release, rest: Res.Grant) -> Maybe<&1, Lease>: Admission.lease.split (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=lease.split) def lease.split(parts: Res.Split, pool: Res.Pool) -> Maybe<&1, Lease>: Admission.lease.give (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=lease.give) def lease.give(lease: Lease) -> Maybe<&1, Lease>: Admission.count (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=count) def count(+pool: Res.Pool) -> U32: Admission.counts (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=counts) def counts(ledger: Ledger) -> Counts & Ledger: Admission.final (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=final) def final(ledger: Ledger) -> Counts: Admission.marked (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=marked) # Raises each high-water mark to its current count. def marked(ledger: Ledger) -> Ledger: Admission.refused (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=refused) def refused(kind: U32, marks: Marks) -> Marks: Admission.acquire.rollback (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=acquire.rollback) # A refused buffer returns the connection lease it already took. def acquire.rollback(connections: Maybe<&1, Lease>, active: Lease, buffered: Lease, marks: Marks) -> Booked: Admission.acquire.buffered (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=acquire.buffered) def acquire.buffered(taken: Taken, connections: Lease, active: Lease, marks: Marks) -> Booked: Admission.acquire.connection (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=acquire.connection) # A connection holds one connection unit and one buffer unit, taken together. def acquire.connection(taken: Taken, active: Lease, buffered: Lease, marks: Marks) -> Booked: Admission.acquire.active (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=acquire.active) def acquire.active(taken: Taken, connections: Lease, buffered: Lease, marks: Marks) -> Booked: Admission.acquire (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=acquire) def acquire(kind: U32, ledger: Ledger) -> Booked: Admission.acquire.running (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=acquire.running) def acquire.running(running: Bool, kind: U32, ledger: Ledger) -> Booked: Admission.release.connection (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=release.connection) def release.connection(connections: Maybe<&1, Lease>, buffered: Maybe<&1, Lease>, active: Lease, marks: Marks) -> Booked: Admission.release.active (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=release.active) def release.active(active: Maybe<&1, Lease>, connections: Lease, buffered: Lease, marks: Marks) -> Booked: Admission.release (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=release) def release(kind: U32, ledger: Ledger) -> Booked: Admission.stopped (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=stopped) def stopped(closing: Bool, counts: Counts) -> Bool: Admission.idle (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=idle) def idle(closing: Bool, counted: Counts & Ledger) -> Bool & Ledger: Admission.Step (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=Step) type Step is Type: Waiting{ledger: Ledger} Received{ledger: Ledger, command: Maybe<&1, Command>} Acquired{reply: Chan(Bool), booked: Booked} Released{reply: Chan(Unit), booked: Booked} Counted{reply: Chan(Counts), counted: Counts & Ledger} Finishing{checked: Bool & Ledger} Admission.loop (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=loop) def loop(+inbox: Chan(Command), +running: Bool, +closing: Bool, step: Step) -> IO(Counts): Admission.open (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=open) def open(caps: Caps) -> IO(Chan(Command)): Admission.open.owner (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=open.owner) # The affine server owner joins this actual actor result after closing its listener. def open.owner(caps: Caps) -> IO(Chan(Command) & Chan(Counts)): Admission.boolean.sent (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=boolean.sent) def boolean.sent(sent: Result<&1, &1, Command, Unit>, +reply: Chan(Bool)) -> IO(Bool): Admission.quiesce (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=quiesce) # False also covers copied controls used after actual controller closure. def quiesce(+inbox: Chan(Command)) -> IO(Bool): Admission.running (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=running) def running(+inbox: Chan(Command)) -> IO(Bool): Admission.take (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=take) def take(+inbox: Chan(Command), kind: U32) -> IO(Bool): Admission.give.sent (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=give.sent) # Correct owners cannot retire the actor while a lease remains counted. If an # internal channel is externally closed, report the violation instead of joining # an unanswered reply or pretending a retained operation drained. def give.sent(sent: Result<&1, &1, Command, Unit>, +reply: Chan(Unit)) -> IO(Unit): Admission.give (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=give) def give(+inbox: Chan(Command), kind: U32) -> IO(Unit): Admission.snapshot.sent (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=snapshot.sent) def snapshot.sent(sent: Result<&1, &1, Command, Unit>, +reply: Chan(Counts)) -> IO(Maybe<&2, Counts>): Admission.snapshot (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=snapshot) # A successful rendezvous send was received: Stop cannot erase a queued request. # After controller closure a failed send returns None without waiting on its reply. def snapshot(+inbox: Chan(Command)) -> IO(Maybe<&2, Counts>): Admission.close (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/admission.bend&name=close) # Retire accounting after listener closure; quiesce is the separate admission # cutover. Finite internal fixtures may finish their already-accepted protocol. def close(inbox: Chan(Command)) -> IO(Unit): Completion.Outcome (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/completion.bend&name=Outcome) type Outcome is Data: HostAccepted{} WriteFailed{code: U32, message: String} IncompleteResponse{} Completion.Completion (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/completion.bend&name=Completion) type Completion<-D: Data> is Data: Completion{payload: D, status: U32, outcome: Outcome} Completion.Receipt (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/completion.bend&name=Receipt) # Consumed inline while the admitted operation is still held. # Supported receipts capture Data only through receipt's typed factory and a # closed callback. Never hide affine dependencies in a disposable receipt. type Receipt is Type: Unobserved{} Observed{send: U32 -> Outcome -> IO(Unit)} Completion.receipt.send (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/completion.bend&name=receipt.send) def receipt.send(~D: Data, payload: D, +channel: Chan(Completion), status: U32, outcome: Outcome) -> IO(Unit): Completion.receipt (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/completion.bend&name=receipt) def receipt(~D: Data, ~done: Completion -> IO(Unit), payload: D) -> Receipt: Completion.open (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/completion.bend&name=open) # The observer owns IO.join/explicit close, including when it receives later. # Closing before reception is disposal; it never carries affine resources. def open(~D: Data, payload: D) -> IO(Receipt & Chan(Completion)): Completion.report (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/completion.bend&name=report) def report(receipt: Receipt, status: U32, outcome: Outcome) -> IO(Unit): Completion.ignore (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/completion.bend&name=ignore) # Explicit absence of a configured observer performs no logging or allocation. def ignore(status: U32, outcome: Outcome) -> IO(Unit): Http.Req (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Req) type Req is Type: Req{method: String, path: String, headers: Map<&2, List<&2, String>>, body: Bytes.Bytes} Http.Res (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Res) type Res is Type: Res{status: U32, headers: Map<&2, List<&2, String>>, body: Bytes.Bytes} Http.Reply (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Reply) # A typed Data payload can be captured in receipt; the response remains affine. type Reply is Type: Reply{response: Res, receipt: Completion.Receipt} Http.reply.complete (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=reply.complete) def reply.complete(~D: Data, ~done: Completion.Completion -> IO(Unit), payload: D, response: Res) -> Reply: Http.Body (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Body) # The body type and its conversions, so a caller needs no bytes import. def Body() -> Type: Http.from_string (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=from_string) # A byte string (one Char per octet) to a body, and back. def from_string(+s: String) -> Bytes.Bytes: Http.to_string (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=to_string) def to_string(b: Bytes.Bytes) -> String: Http.length (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=length) def length(b: Bytes.Bytes) -> Bytes.Bytes & U32: Http.Err (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Err) # Why fetch failed. Wire errors keep the errno and the text the effect already had. # ponytail: 60 and 110 are ETIMEDOUT on macOS and Linux. Windows is out of scope. type Err is Data: ErrUrl{} ErrDns{} ErrConnect{code: U32, why: String} ErrTls{code: U32, why: String} ErrRead{code: U32, why: String} ErrWrite{code: U32, why: String} ErrTimeout{} ErrRedirect{} ErrBad{} Http.err.late (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=err.late) def err.late(+code: U32) -> Bool: Http.err.pick (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=err.pick) def err.pick(e: Err, late: Bool) -> Err: Http.err.or_late (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=err.or_late) def err.or_late(code: U32, e: Err) -> Err: Http.Fields (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Fields) type Fields is Data: FieldsBad{} FieldsOk{m: Map<&2, List<&2, String>>} Http.empty (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=empty) # One list per field name, in arrival order. header() is the first value. # Set-Cookie is never joined. Encode writes one line per value. def empty() -> Map<&2, List<&2, String>>: Http.fields.of (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=fields.of) def fields.of(r: Map<&2, List<&2, String>> & List<&2, String>) -> List<&2, String>: Http.fields (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=fields) def fields(+h: Map<&2, List<&2, String>>, k: String) -> List<&2, String>: Http.header.first (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=header.first) def header.first(xs: List<&2, String>) -> String: Http.header (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=header) def header(+h: Map<&2, List<&2, String>>, k: String) -> String: Http.field.last (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=field.last) def field.last(xs: List<&2, String>) -> String: Http.header.last (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=header.last) # Transfer-Encoding is a list; chunked, when present, is the last coding. def header.last(+h: Map<&2, List<&2, String>>, k: String) -> String: Http.snoc (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=snoc) def snoc(xs: List<&2, String>, v: String) -> List<&2, String>: Http.set (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=set) def set(m: Map<&2, List<&2, String>>, k: String, v: String) -> Map<&2, List<&2, String>>: Http.add (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=add) def add(+m: Map<&2, List<&2, String>>, +k: String, v: String) -> Map<&2, List<&2, String>>: Http.sanitize.cons (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=sanitize.cons) def sanitize.cons(ch: Char, rest: String, drop: Bool) -> String: Http.sanitize (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=sanitize) def sanitize(s: String) -> String: Http.drop_cr.last.if (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=drop_cr.last.if) def drop_cr.last.if(cr: Bool, c: U32) -> String: Http.drop_cr.last (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=drop_cr.last) def drop_cr.last(+c: U32) -> String: Http.drop_cr.go (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=drop_cr.go) # prev is the char before s; it is kept unless it is a final CR. def drop_cr.go(s: String, prev: U32) -> String: Http.drop_cr (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=drop_cr) def drop_cr(s: String) -> String: Http.blank_end.go (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=blank_end.go) # w holds the last four octets; a char past 255 clears it. def blank_end.go(s: String, w: U32) -> Bool: Http.blank_end (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=blank_end) # String.ends_with(s, "\r\n\r\n") in one pass, with no reversed copy. def blank_end(s: String) -> Bool: Http.trim_end.cons (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=trim_end.cons) def trim_end.cons(h: Char, r: String, space: Bool) -> String: Http.trim_end (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=trim_end) # String.trim_end without the two reversed copies. def trim_end(s: String) -> String: Http.trim (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=trim) def trim(s: String) -> String: Http.take.cut (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=take.cut) # Bool.pick evaluates both arms; a split that recursed inside it would reverse acc at every byte. def take.cut(acc: String, rest: String) -> String & String: Http.take_sp.go (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=take_sp.go) # hit: the last char pushed onto acc was the stop char. def take_sp.go(s: String, acc: String, hit: Bool) -> String & String: Http.take_sp (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=take_sp) def take_sp(s: String) -> String & String: Http.start_line.ver (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=start_line.ver) def start_line.ver(m: String, pv: String & String) -> String & String & String: Http.start_line.rest (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=start_line.rest) def start_line.rest(mr: String & String) -> String & String & String: Http.start_line (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=start_line) def start_line(s: String) -> String & String & String: Http.split_at_blank.go (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=split_at_blank.go) def split_at_blank.go(s: String, e: Bool, w: U32, acc: String) -> String & String: Http.split_at_blank.flag.go (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=split_at_blank.flag.go) # split_at_blank, plus whether the head ends in the blank line. def split_at_blank.flag.go(+raw: String, s: String, off: Nat, w: U32, e: Bool) -> String & String & Bool: Http.split_at_blank.pair (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=split_at_blank.pair) def split_at_blank.pair(r: String & String & Bool) -> String & String: Http.split_at_blank (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=split_at_blank) def split_at_blank(+s: String) -> String & String: Http.split_colon.go (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=split_colon.go) def split_colon.go(s: String, acc: String, hit: Bool) -> String & String: Http.split_colon (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=split_colon) def split_colon(+s: String) -> String & String: Http.has_header.of (https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=has_header.of) def has_header.of(r: Map<&2, List<&2, String>> & Bool) -> Bool: More: https://jend.leeeet.dev/packages/bend-kit-http.txt?definitions_offset=100