Page 1 of 1

http requests in version 7.4 +

Posted: Sun Dec 12, 2021 9:12 am
by justcolorado
As a developer, I would like to make an HTTP request from ren'py to my server, so that I can use the reply for an in-game feature.

I used this repo :D https://github.com/renpytom/renpy-requests and it works fine on v7.3.5, but not on releases after.

I am OK with using v7.3.5 but there are some great new features in 7.4 series that I would also like to use.
Is there a new way to import requests, or a compatible substitute library for http requests I can use?

Re: http requests in version 7.4 +

Posted: Sun Dec 12, 2021 10:24 am
by Ocelot
That is probavbly because requests are already bundled with RenPy starting from 7.4.0.

Re: http requests in version 7.4 +

Posted: Sun Dec 12, 2021 3:12 pm
by justcolorado
Ocelot wrote:
Sun Dec 12, 2021 10:24 am
That is probavbly because requests are already bundled with RenPy starting from 7.4.0.
Thanks! that is great news. I migrated my project to the latest, imported requests without adding any packages in my /game/ directory. And now everything works fine.

In the old repo it said "It supports http and https, with a huge caveat - the https support is not validated, which means that the request - and any passwords it contains - can be read by someone trying to intercept the connection."

Do you know if this issue still exists in the latest version?

Re: http requests in version 7.4 +

Posted: Thu Dec 16, 2021 1:42 pm
by PyTom
The new version fixes that, so the requests that are made should be validated.