Post ASF7BQWJXli44R2NEW by hkc@pl.salushnes.solutions
(DIR) More posts by hkc@pl.salushnes.solutions
(DIR) Post #ASF6youjXKalxiRpj6 by hkc@pl.salushnes.solutions
2023-02-01T17:37:08.151427Z
0 likes, 0 repeats
Trying Rust for the first* time and documentation is utter garbage tbqh Like, I’m reading http crate docs and I have no fucking clue how to read response from it. Okay, I have a Request, what now? .into_body() returns.. nothing? .into_parts() returns uhh.. headers and nothing. What am I supposed to do? Maybe I should use another crate..? I just want to make some GET requests…* not for the first time, I tried it before and didn’t like it at all. Now I’m trying to change my opinion on that after two days of watching a lot of videos talking about how good Rust is.
(DIR) Post #ASF6yqVdbbhquSiot6 by mo@mastodon.ml
2023-02-01T17:40:25Z
0 likes, 0 repeats
@hkc what crate are you using?
(DIR) Post #ASF7BQWJXli44R2NEW by hkc@pl.salushnes.solutions
2023-02-01T17:40:54.516749Z
0 likes, 0 repeats
@mo https://crates.io/crates/http
(DIR) Post #ASF7BQz1p0g7VUTIzQ by mo@mastodon.ml
2023-02-01T17:42:42Z
0 likes, 0 repeats
@hkc ah, yesIt's just types (for crate interoperability), it doesn't do any requestsI use https://docs.rs/ureq/ for synchronous http client, and https://docs.rs/reqwest/ is de-facto standard for asynchronous code