View Source cowmachine_response (cowmachine v1.12.1)
Link to this section Summary
Link to this section Functions
-spec send_response(Context) -> Result when Context :: cowmachine_req:context(), Result :: {ok, Req, Env} | {stop, Req}, Req :: cowboy_req:req(), Env :: cowboy_middleware:env().
-spec send_stream_body(FunContext, Context) -> Result when FunContext :: {InitialData, InitialFun} | InitialFun, InitialData :: binary() | {file, Filename} | {file, Size, Filename} | done | WriterFun, Filename :: file:filename_all(), WriterFun :: function(), Size :: non_neg_integer(), InitialFun :: function(), Context :: cowmachine_req:context(), Result :: cowmachine_req:context().
-spec server_header() -> Result when Result :: binary().