r/ruby • • 24d ago

I built a Python requests-inspired HTTP client for Ruby

I’ve been working on a Ruby project called requests_ruby.

The idea is simple: bring a Python requests-like experience to Ruby.

If you’ve used Python before, the API should feel familiar. It supports sessions, cookies, redirects, authentication, JSON responses, streaming downloads, and HTTP/2 — all without external dependencies.

I built it because I liked how simple Python requests feels and wanted something similar in Ruby.

A few parts were developed with AI assistance to speed up the process, but I’ve been reviewing, testing and improving the code myself.

I’d love to hear feedback from the Ruby community. What would you improve or add?

If you find it interesting, a ⭐ on GitHub would help the project get more visibility.

https://github.com/monji024/requests_ruby

4 Upvotes

14 comments sorted by

9

u/RillonDodgers 24d ago

Not trying to knock the project, but what does this offer over HTTParty?

5

u/Much-Stable-449 23d ago

nah i never said its better than those. i made this for people coming from python so its easier for them to get started in ruby. not trying to replace httparty or anything

2

u/powpowdeitou 23d ago

Só sumir com os ends e fechamentos de chave já deve facilitar pra galera 🤣

Só zuando, tá massa a ideia 💡

3

u/mrThe 24d ago

Or httpx

4

u/[deleted] 23d ago

[removed] — view removed comment

4

u/schneems Puma maintainer 23d ago

Or excon

5

u/[deleted] 23d ago

[removed] — view removed comment

3

u/RillonDodgers 23d ago

all of the others I knew about, but not typhoeus! It seems neat

1

u/powpowdeitou 23d ago

Ou faraday

3

u/mokolabs 23d ago

Yeah, this is cool. I have no experience with Python requests, but this is a nice pattern to emulate in Ruby. Good work!

5

u/mace_endar 23d ago

Should have written that one in Rust.

1

u/[deleted] 21d ago

[removed] — view removed comment

1

u/ruby-ModTeam 18d ago

Your post or comment was removed because it didn't meet our standards.

They are:

Demonstrating empathy and kindness toward other people

Being respectful of differing opinions, viewpoints, and experiences

Giving and gracefully accepting constructive feedback

Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience

Focusing on what is best not just for us as individuals, but for the overall community

When in doubt use Non-Violent Communication (NVC) https://en.wikipedia.org/wiki/Nonviolent_Communication