-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Hello!
As far as I understand, sending data over a socket as one would do with httpc is one of the cases where using an iolist (or Gleam string_tree / bytes_tree) would make sense, as the BEAM optimizes for that.
I don't think this currently possible with httpc, unless I'm missing something?
If I use gleam_json to construct a JSON payload to send as a body, the docs recommend serializing to a string tree https://hexdocs.pm/gleam_json/gleam/json.html#to_string_tree but if I wanted to send that body with httpc, I'd have to convert to string or bit_array to use dispatch or dispatch_bits.
Would a PR be accepted that adds dispatch_string_tree and dispatch_bytes_tree functions?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels