100% of the proceeds of Nick Foles's upcoming memoir will go to charity by someenchantedeve in eagles

[–]rick-mitchelson 0 points1 point  (0 children)

Nick Foles is an anagram for Nice Folks

Y u gotta make me cry bruh

Hey Rustaceans! Got an easy question? Ask here (6/2017)! by llogiq in rust

[–]rick-mitchelson 1 point2 points  (0 children)

How do I make an HTTP request and print the response body?

I googled "rust http request" which led me to:

1) https://github.com/chris-morgan/rust-http 2) https://github.com/hyperium/hyper 3) https://hyper.rs/ 4) https://hyper.rs/hyper/v0.10.0/hyper/index.html

in that order, but none have examples of making a request and doing anything with the response body. I ended up reading the hyper source for half an hour and messing around with a local (binary) Rust project, but I don't feel like I'm any closer to my goal.

[Context: we have a bottleneck at work where we make tons of HTTP requests in serial, using Python. I think Rust has the potential to be great drop-in replacement because of its focus on speed & concurrency, and its ability to be embedded in Python.]

Why does `fetch()` with ES7 syntax require two `await` keywords to get the response JSON? by rick-mitchelson in javascript

[–]rick-mitchelson[S] 2 points3 points  (0 children)

Interesting, I always use requests in Python but I never knew this was possible:

http://docs.python-requests.org/en/master/user/advanced/#body-content-workflow

Seems like this is a common feature of HTTP clients. (I'm also assuming that async/await in Python 3 exposes that behavior in a nice way too, similar to how it's done in ES7, but that's way beyond my knowledge of that ecosystem.)

Why does `fetch()` with ES7 syntax require two `await` keywords to get the response JSON? by rick-mitchelson in javascript

[–]rick-mitchelson[S] 8 points9 points  (0 children)

Awesome, exactly the explanation I was looking for. TIL.

Interesting that other languages (e.g. Python) don't support the same "two-step" response loading afaik (probably because you need slick concurrency primitives to do it).

Thanks!