API reference Dodo 0.1.4

std/http/https

Public declarations, types, methods, and source contracts for std/http/https.

On this page

Library guide · API index and notation

This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.

import "std/http/https"

Names used in signatures

Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.

Alias Package Source file
hosted std/http/hosted https.dodo
hosting std/http/hosting https.dodo
http std/http https.dodo
io std/io https.dodo
native std/net/native https.dodo
net std/net https.dodo
openssl std/tls/openssl https.dodo
server std/web/hosted https.dodo
stream std/tls/stream https.dodo
tls std/tls https.dodo
web std/web https.dodo

Trust

Struct · Source

Import selects OpenSSL >=3.5, including its internal heap allocations. Caller staging is bounded. Trust uses OpenSSL paths, not the Windows store.

pub struct Trust {
    pub pem: &[u8]
    pub system_roots: bool
}

Trust.system

Function · Source

pub fn system() -> Trust from(static)

Trust.pem_roots

Function · Source

pub fn pem_roots(pem: &[u8]) -> Trust from(pem)

Transport

Struct · Source

pub struct Transport {
    // Private implementation fields omitted.
}

Transport.new

Function · Source

pub fn new(engine: openssl.Engine, socket: &mut native.TcpConnection, incoming: &mut[u8], outgoing: &mut[u8]) -> Transport!hosting.Error from(socket, incoming, outgoing)

Transport.handshake

Function · Source

pub fn handshake<C, X>(&mut self, clock: &mut C, cancel: &X, until: u64) -> void!hosting.Error

Transport.poll_read

Function · Source

pub fn poll_read(&mut self, data: &mut[u8]) -> io.Poll!io.Error

Transport.poll_write

Function · Source

pub fn poll_write(&mut self, data: &[u8]) -> io.Poll!io.Error

Transport.flush

Function · Source

pub fn flush(&mut self) -> bool!hosting.Error

Transport.wait

Function · Source

pub fn wait(&mut self, writing: bool, milliseconds: u32) -> void!hosting.Error

Transport.finish

Function · Source

Deliver our close_notify, without waiting for the peer’s reply. Errors still abort on drop; HTTP framing determines successful body completion.

pub fn finish<C, X>(&mut self, clock: &mut C, cancel: &X, until: u64) -> void!hosting.Error

Connector

Struct · Source

Public connector for Client.request_with; it also accepts plain HTTP URLs.

pub struct Connector {
    // Private implementation fields omitted.
}

Connector.new

Function · Source

pub fn new(trust: Trust) -> Connector from(trust)

Connector.exchange

Function · Source

pub fn exchange<W, C, X>(&mut self, socket: &mut native.TcpConnection, host: &[u8], secure: bool,
    request: &http.Request, body: &[u8], workspace: &mut[u8], config: &hosted.Config, head: &mut hosted.Head,
    sink: &mut W, clock: &mut C, cancel: &X, until: u64, delivered: &mut u64) -> hosted.Response!hosting.Error

Client

Struct · Source

pub struct Client {
    // Private implementation fields omitted.
}

Client.new

Function · Source

pub fn new(workspace: &mut[u8], config: hosted.Config, trust: Trust) -> Client!hosting.Error from(workspace, trust)

Client.header

Function · Source

pub fn header(&self, name: &[u8], occurrence: usize) -> Option<http.Header> from(self)

Client.get

Function · Source

pub fn get(&mut self, url: &[u8], storage: &mut[u8]) -> hosted.Response!hosting.Error

Client.get_to

Function · Source

pub fn get_to<W>(&mut self, url: &[u8], sink: &mut W) -> hosted.Response!hosting.Error

Client.request

Function · Source

pub fn request<W>(&mut self, request: &hosted.Request, sink: &mut W) -> hosted.Response!hosting.Error

Client.request_with

Function · Source

pub fn request_with<W, R, C, X>(&mut self, request: &hosted.Request, sink: &mut W,
    resolver: &mut R, clock: &mut C, cancel: &X) -> hosted.Response!hosting.Error

Acceptor

Struct · Source

pub struct Acceptor {
    // Private implementation fields omitted.
}

Acceptor.new

Function · Source

pub fn new(config: openssl.Config) -> Acceptor from(config)

Acceptor.serve

Function · Source

pub fn serve<H, C, X>(&mut self, socket: &mut native.TcpConnection, router: &web.Router, handler: &mut H,
    workspace: &mut[u8], request_body: &mut[u8], response_body: &mut[u8], config: &server.Config,
    request_id: u64, clock: &mut C, cancel: &X) -> bool!hosting.Error

serve

Function · Source

pub fn serve<H>(address: &[u8], routes: &[web.Route], handler: &mut H, workspace: &mut[u8], request_body: &mut[u8],
response_body: &mut[u8], config: server.Config, identity: openssl.Config) -> server.Report!hosting.Error

Type to search all documentation.

Keyboard shortcuts

Search documentation
Ctrl K or /
Move through results
↑ ↓
Open selected result
Enter
Close a dialog
Esc
Show these shortcuts
?