std.http.Client.basic_authorization
- Kind
- struct
- Module
std.http.Client
Source: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The entries of std.http.Client in the Zig reference. This page has 76 cards.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn value(uri: Uri, out: []u8) []u8
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn valueLength(user_len: usize, password_len: usize) usize
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn valueLengthFromUri(uri: Uri) usize
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn write(uri: Uri, out: *Writer) Writer.Error!void
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn connect(client: *Client, host: HostName, port: u16, protocol: Protocol) ConnectError!*Connection
Connect to `host:port` using the specified protocol.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn destroy(c: *Connection, io: Io) void
If this is called without calling `flush` or `end`, data will be dropped unsent.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn end(c: *Connection) Writer.Error!void
If the connection is a TLS connection, sends the close_notify alert.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn flush(c: *Connection) Writer.Error!void
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn getReadError(c: *const Connection) ?ReadError
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn host(c: *Connection) HostName
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn reader(c: *Connection) *Reader
HTTP protocol from server to client.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn writer(c: *Connection) *Writer
HTTP protocol from client to server.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
A Least-Recently-Used cache of open connections to be reused.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn acquire(pool: *ConnectionPool, io: Io, connection: *Connection) Io.Cancelable!void
Acquires an existing connection from the connection pool.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn acquireUnsafe(pool: *ConnectionPool, connection: *Connection) void
Acquires an existing connection from the connection pool.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn addUsed(pool: *ConnectionPool, io: Io, connection: *Connection) Io.Cancelable!void
Adds a newly created node to the pool of used connections.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
The criteria for a connection to be considered a match.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn deinit(pool: *ConnectionPool, io: Io) void
Frees the connection pool and closes all connections within.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn findConnection(pool: *ConnectionPool, io: Io, criteria: Criteria) Io.Cancelable!?*Connection
Finds and acquires a connection from the connection pool matching the criteria.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn release(pool: *ConnectionPool, connection: *Connection, io: Io) void
Tries to release a connection back to the connection pool.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn resize(pool: *ConnectionPool, io: Io, new_size: usize) Io.Cancelable!void
Resizes the connection pool.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn connectProxied(client: *Client, proxy: *Proxy, proxied_host: HostName, proxied_port: u16) !*Connection
Connect to `proxied_host:proxied_port` using the specified proxy with HTTP CONNECT. This will reuse a connection if one is already open.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn connectTcp(client: *Client, host: HostName, port: u16, protocol: Protocol) ConnectTcpError!*Connection
Reuses a `Connection` if one matching `host` and `port` is already open.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn connectTcpOptions(client: *Client, options: ConnectTcpOptions) ConnectTcpError!*Connection
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn connectUnix(client: *Client, path: []const u8) ConnectUnixError!*Connection
Connect to `path` as a unix domain socket.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn deinit(client: *Client) void
Release all associated resources with the client.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fetch(client: *Client, options: FetchOptions) FetchError!FetchResult
Perform a one-shot HTTP request with the provided options.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn initDefaultProxies(client: *Client, arena: Allocator, environ_map: *const std.process.Environ.Map) !void
Populates `http_proxy` and `https_proxy` via standard proxy environment variables.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromScheme(scheme: []const u8) ?Protocol
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn fromUri(uri: Uri) ?Protocol
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn request(client: *Client, method: http.Method, uri: Uri, options: RequestOptions) RequestError!Request
Open a connection to the host specified by `uri` and prepare to send a HTTP request.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn deinit(r: *Request) void
Returns the request's `Connection` back to the pool of the `Client`.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn receiveHead(r: *Request, redirect_buffer: []u8) ReceiveHeadError!Response
If handling redirects and the request has no payload, then this function will automatically follow redirects.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
Any value other than `not_allowed` or `unhandled` means that integer represents how many remaining redirects are allowed.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn init(n: u16) RedirectBehavior
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn remaining(rb: RedirectBehavior) u16
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn subtractOne(rb: *RedirectBehavior) void
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sendBodiless(r: *Request) Writer.Error!void
Sends and flushes a complete request as only HTTP head, no body.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sendBodilessUnflushed(r: *Request) Writer.Error!void
Sends but does not flush a complete request as only HTTP head, no body.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sendBody(r: *Request, buffer: []u8) Writer.Error!http.BodyWriter
Transfers the HTTP head over the connection and flushes.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sendBodyComplete(r: *Request, body: []u8) Writer.Error!void
Transfers the HTTP head and body over the connection and flushes.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn sendBodyUnflushed(r: *Request, buffer: []u8) Writer.Error!http.BodyWriter
Transfers the HTTP head over the connection, which is not flushed until `BodyWriter.flush` or `BodyWriter.end` is called.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn bodyErr(response: *const Response) ?http.Reader.BodyError
After receiving `error.ReadFailed` from the `Reader` returned by `reader` or `readerDecompressing`, this function accesses the more specific error code.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn iterateHeaders(h: Head) http.HeaderIterator
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn parse(bytes: []const u8) ParseError!Head
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn iterateTrailers(response: *const Response) http.HeaderIterator
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn reader(response: *Response, transfer_buffer: []u8) *Reader
If compressed body has been negotiated this will return compressed bytes.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.
pub fn readerDecompressing(response: *Response, transfer_buffer: []u8, decompress: *http.Decompress, decompress_buffer: []u8) *Reader
If compressed body has been negotiated this will return decompressed bytes.
std.http.ClientSource: codeberg.org, ziglang.org. JSON record. This entry is a card. Help write this page.