Http module

bytes_of

procedureextensionexperimentalSource

The bytes of text (the same memory), for a request's body.

Example
request := Client_Request.{ method = .POST, url = "/echo", body = bytes_of("payload") };
assert(request.body.count == 7);

Doesn't run in the browser (skipped on wasm).

bytes_of :: (text: string) -> [] u8

Parameters

text: string

Returns

[] u8

See also