std.http.Server
The entries of std.http.Server in the Zig reference. This page has 34 cards.
pub fn init(in: *Reader, out: *Writer) Server
Initialize an HTTP server that can respond to multiple requests on the same connection.
- Kind
- function
- Module
std.http.Server
pub fn receiveHead(s: *Server) ReceiveHeadError!Request
- Kind
- function
- Module
std.http.Server
- Kind
- struct
- Module
std.http.Server
- Kind
- error set
- Module
std.http.Server
- Kind
- struct
- Module
std.http.Server
pub fn parse(bytes: []const u8) ParseError!Head
- Kind
- function
- Module
std.http.Server
- Kind
- error set
- Module
std.http.Server
pub fn readerExpectContinue(request: *Request, buffer: []u8) ExpectContinueError!*Reader
In the case that the request contains "expect: 100-continue", this function writes the continuation header, which means it can fail with a write error.
- Kind
- function
- Module
std.http.Server
pub fn readerExpectNone(request: *Request, buffer: []u8) *Reader
- Kind
- function
- Module
std.http.Server
pub fn respond(request: *Request, content: []const u8, options: RespondOptions) ExpectContinueError!void
Send an entire HTTP response to the client, including headers and body.
- Kind
- function
- Module
std.http.Server
- Kind
- error set
- Module
std.http.Server
- Kind
- struct
- Module
std.http.Server
pub fn respondStreaming(request: *Request, buffer: []u8, options: RespondStreamingOptions) ExpectContinueError!http.BodyWriter
The header is not guaranteed to be sent until `BodyWriter.flush` or `BodyWriter.end` is called.
- Kind
- function
- Module
std.http.Server
- Kind
- struct
- Module
std.http.Server
pub fn respondUnflushed(request: *Request, content: []const u8, options: RespondOptions) ExpectContinueError!void
- Kind
- function
- Module
std.http.Server
pub fn respondWebSocket(request: *Request, options: WebSocketOptions) ExpectContinueError!WebSocket
The header is not guaranteed to be sent until `WebSocket.flush` is called on the returned struct.
- Kind
- function
- Module
std.http.Server
- Kind
- union
- Module
std.http.Server
pub fn upgradeRequested(request: *const Request) UpgradeRequest
Does not invalidate `request.head`.
- Kind
- function
- Module
std.http.Server
- Kind
- struct
- Module
std.http.Server
pub fn writeExpectContinue(request: *Request) ExpectContinueError!void
- Kind
- function
- Module
std.http.Server
- Kind
- struct
- Module
std.http.Server
pub fn flush(ws: *WebSocket) Writer.Error!void
- Kind
- function
- Module
std.http.Server
- Kind
- enum
- Module
std.http.Server
pub fn readSmallMessage(ws: *WebSocket) ReadSmallTextMessageError!SmallMessage
Reads the next message from the WebSocket stream, failing if the message does not fit into the input buffer.
- Kind
- function
- Module
std.http.Server
- Kind
- error set
- Module
std.http.Server
- Kind
- struct
- Module
std.http.Server
pub fn writeMessage(ws: *WebSocket, data: []const u8, op: Opcode) Writer.Error!void
- Kind
- function
- Module
std.http.Server
pub fn writeMessageUnflushed(ws: *WebSocket, data: []const u8, op: Opcode) Writer.Error!void
- Kind
- function
- Module
std.http.Server
pub fn writeMessageVec(ws: *WebSocket, data: [][]const u8, op: Opcode) Writer.Error!void
- Kind
- function
- Module
std.http.Server
pub fn writeMessageVecUnflushed(ws: *WebSocket, data: [][]const u8, op: Opcode) Writer.Error!void
- Kind
- function
- Module
std.http.Server