~/bend-docscommunity

http/completion.bend fails

raw source on the hub · import bend-kit-http@0.31.1.0/http/completion.bend as Completion

Copied response completion data; successful host writes do not prove peer receipt.

1 import
import Base

Types

type Outcome source · line 4 · raw

Data

type Completion source · line 9 · raw

@-D:Data -> Data

type Receipt source · line 15 · raw

Type

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.

Definitions

def report source · line 34 · raw

@receipt:Receipt -> @status:U32 -> @outcome:Outcome -> IO(Unit)

def ignore source · line 42 · raw

@status:U32 -> @outcome:Outcome -> IO(Unit)

Explicit absence of a configured observer performs no logging or allocation.

Templates

template receipt.send source · line 19 · raw

@-D:Data -> @payload:D -> @+channel:Chan(Completion<D>) -> @status:U32 -> @outcome:Outcome -> IO(Unit)

template receipt source · line 24 · raw

@-D:Data -> @-done:(@_:Completion<D> -> IO(Unit)) -> @payload:D -> Receipt

template open source · line 29 · raw

@-D:Data -> @payload:D -> IO(Pair(Receipt, Chan(Completion<D>)))

The observer owns IO.join/explicit close, including when it receives later. Closing before reception is disposal; it never carries affine resources.