You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's not very ergonomic. Sure, I know at a high-level that I need to collect the byte stream into a vector. But it still took me a while to figure out the exact types to make it compile...
It would be nice if there were a more obvious API that makes it easier to "just get the body string".
reqwest::Response already has useful methods like text() or json(). But since progenitor's client hides the reqwest::Response from me, I cannot use those.
Alternatively, it would be nice to have an example somewhere that shows how to read such basic text responses.
Version
(cargo-)progenitor 0.7.0
The text was updated successfully, but these errors were encountered:
For text response values, it is not very ergonomic to get the text (the response body).
Example
Consider the following API:
Progenitor generates the following code:
To integrate this in my code and read the response, I need something like this:
Expected behaviour
That's not very ergonomic. Sure, I know at a high-level that I need to collect the byte stream into a vector. But it still took me a while to figure out the exact types to make it compile...
It would be nice if there were a more obvious API that makes it easier to "just get the body string".
reqwest::Response already has useful methods like
text()
orjson()
. But since progenitor's client hides thereqwest::Response
from me, I cannot use those.Alternatively, it would be nice to have an example somewhere that shows how to read such basic text responses.
Version
(cargo-)progenitor 0.7.0
The text was updated successfully, but these errors were encountered: