1
Fork 0
hare-http/net/http/response.ha
2023-02-10 10:13:30 +01:00

19 lines
463 B
Hare

use io;
// Stores state related to an HTTP response.
export type response = struct {
// The HTTP status for this request as an integer.
status: uint,
// The HTTP status reason phrase.
reason: str,
// The HTTP headers provided by the server.
header: header,
// The response body, if any.
body: (io::handle | void),
};
// Frees state associated with an HTTP [[response]].
export fn response_finish(resp: *response) void = {
header_free(&resp.header);
};