rl_lang/docs/entries/stdlib/http/
http_respond.rs1use crate::docs::entry::FnEntry;
2
3pub static HTTP_RESPOND: FnEntry = FnEntry {
4 signature: "http_respond(req, status, body, content_type?)",
5 description: "sends a response for `req` and consumes the request handle; using the handle again afterward errors",
6 example: r#"
7get std::http::http_respond
8
9http_respond(req, 200, "hello world", "text/plain")"#,
10 expected_output: None,
11 returns: "Result[null]",
12 errors: Some("Err(string) on a write/send failure"),
13 see_also: &["http_server_recv"],
14 since: Some("v0.1.5"),
15};