HuriURI Buf_write serialization for the requests library.
This module provides efficient Eio.Buf_write serialization for Uri.t values. For all other URI operations, use the uri opam library directly.
(* Use Uri for parsing and manipulation *)
let uri = Uri.of_string "https://example.com/path" in
let host = Uri.host uri in
(* Use Huri.write for efficient serialization to Buf_write *)
Eio.Buf_write.with_flow flow (fun w ->
Huri.write w uri
)type t = Uri.tt is an alias for Uri.t. Use the uri library for all operations except Buf_write serialization.
val write : Eio.Buf_write.t -> t -> unitwrite w uri writes uri directly to the buffer w. This is more efficient than Uri.to_string when writing to an I/O sink as it avoids intermediate string allocation.