I’ve vibe-coded an almost pure Mojo implementation of requests (a few FFI calls to OpenSSL and libc for TLS/sockets), because I needed it for some internal projects.
Features:
- HTTP/1.1 GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS, no Python/libcurl
- HTTPS via OpenSSL (dlopen’d at runtime), cert verification on by default
- Custom CA support:
ca_bundleparam,REQUESTS_CA_BUNDLE/SSL_CERT_FILEenv vars, orverify=Falsefor self-signed/internal certs - IPv4 + IPv6
- Connection pooling / keep-alive, TLS session resumption
- JSON bodies + parsing, redirects, cookie jar, streaming responses
- HTTP proxy support (absolute-form + CONNECT tunneling)
- Typed exceptions,
SessionAPI mirroring Python’srequests
This is only a proof-of-concept — I do not plan to publish or maintain it. But I’d be glad if someone else picks it up, or even if the Modular team wants to adopt parts of it into Mojo’s std.
Feel free to read or use it (Apache 2.0 license): GitHub - ormeilu/mojo-requests-poc: Pure Mojo implementation of Python's requests library (Proof-of-Concept) · GitHub