~/bend-docscommunity

http/response.bend checks

raw source on the hub · import 0x7232384c42402f977ceed3b85efc3adc/http/response.bend as Response

4 imports
import Base
import ./status.bend as S
import ./headers.bend as H
import ../utf8/utf8.bend as U

Types

type Response source · line 8 · raw

Data

a response: the status, the headers, and the body's bytes. The HTTP/1.1 layer adds Content-Length when it writes one

Definitions

def new source · line 11 · raw

@s:0x7232384c42402f977ceed3b85efc3adc/http/status.Status -> @hs:List<&2, 0x7232384c42402f977ceed3b85efc3adc/http/headers.Header> -> @b:List<&2, U32> -> Response

def empty source · line 14 · raw

@s:0x7232384c42402f977ceed3b85efc3adc/http/status.Status -> Response

def typed source · line 17 · raw

@s:0x7232384c42402f977ceed3b85efc3adc/http/status.Status -> @kind:String -> @b:List<&2, U32> -> Response

def bytes source · line 20 · raw

@s:0x7232384c42402f977ceed3b85efc3adc/http/status.Status -> @b:List<&2, U32> -> Response

def text source · line 23 · raw

@s:0x7232384c42402f977ceed3b85efc3adc/http/status.Status -> @t:String -> Response

def html source · line 26 · raw

@s:0x7232384c42402f977ceed3b85efc3adc/http/status.Status -> @t:String -> Response

def redirect source · line 30 · raw

@location:String -> Response

303 See Other: the client follows with a GET (RFC 9110 §15.4.4)

def not_found source · line 33 · raw

Response

def bad_request source · line 36 · raw

Response

def status source · line 45 · raw

@r:Response -> 0x7232384c42402f977ceed3b85efc3adc/http/status.Status