def response.with

gralha-http-core@0.1.0.0 · http.bend:363

import gralha-http-core@0.1.0.0/http.bend as Http
import Base

363# The response with one more header, after the ones it has.
364def response.with(r: Response, name: String, value: String) -> Response:
365  match r:
366    case Response{s, h, b}:
367      Response{s, List.append(&2, Header, h, [Header{name, value}]), b}

Uses (5)

Used by (2)