overdrivenpotato / rust-psp

Rust on PSP. Panic and allocation support. Access PSP system libraries.
Other
588 stars 31 forks source link

How to send HTTP requests? #147

Closed lorenzofelletti closed 1 year ago

lorenzofelletti commented 1 year ago

Is there a way to send HTTP requests with this crate? I would really like to, but can't figure out how. Can somebody please help me?

sajattack commented 1 year ago

I have some test code for HTTPS here https://github.com/sajattack/rust-psp/blob/tls/examples/tls-test/src/main.rs . HTTP is similar without all the tls code. PSP's built-in TLS is expired so most https won't work (unless you use drogue/embedded-tls like I did here)

sajattack commented 1 year ago

There's a simpler example here that just yeets some bytes over a TCP socket https://github.com/sajattack/rust-psp/blob/centronian/examples/centronian/src/main.rs If you combine the get request from tls-test and the socket code from centronian you will have plain HTTP.

lorenzofelletti commented 1 year ago

Thank you very much! Very helpful 😄