]> git.proxmox.com Git - proxmox.git/commit
client: expose body, add generic request methods and streaming
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 27 Aug 2024 07:59:07 +0000 (09:59 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 5 Sep 2024 12:15:11 +0000 (14:15 +0200)
commit04923dd60100bb337556ed0b5c70424a47329e52
tree3ec7beb6b9970a04a197a0e1651685bac5570b4f
parent8021f0a7f637e1cea3af66885ba84d57ced2bfd0
client: expose body, add generic request methods and streaming

The get/put/post/put_without_body/... methods now have a default
implementation forwarding to a generic `request` method as all our
implementations do the same already anyway.

Additionally, in order to allow easy access to a "streaming body", the
Body type is now exposed.

In the future, this crate may also require a wrapper to standardize
the handling of `application/json-seq` streams if we end up using
them, but for now, a simple way to expose the body is enough to get
going.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
proxmox-client/src/client.rs
proxmox-client/src/lib.rs