Chompil

Villager
Member
Joined
Oct 15, 2013
Messages
18
Reaction score
6
First Language
Hebrew
Primarily Uses
Recently found this script, supposed to allow sending web requests (GET/POST)
and fits RGSS, RGSS2, RGSS3.
anyone familiar with it?

original topic at RPGMakerWeb

I can't get it to work though. feels like something silly, as it's supposed to work,
and it's a simple GET request.
here's my code:
Ruby:
host = "http://www.webcode.me"
path = "/index.html/"
result = EFE.request(host, path)
p result
I just get an empty response (with two dashes). no errors.
the example in the demo does use php pages, but I doubt it matters.
here's a sample code from the demo, if that helps:
Ruby:
host = "www.rpgmakervxace.net"
path = "/forum/login.php"
post = "username=kfdsfdsl&password=24324234"
res = EFE.request(host, path, post, 80)
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,386
Reaction score
5,542
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to RGSS Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

rexie09

Villager
Member
Joined
Apr 4, 2021
Messages
19
Reaction score
6
First Language
English
Primarily Uses
RMMZ
Recently found this script, supposed to allow sending web requests (GET/POST)
and fits RGSS, RGSS2, RGSS3.
anyone familiar with it?

original topic at RPGMakerWeb

I can't get it to work though. feels like something silly, as it's supposed to work,
and it's a simple GET request.
here's my code:
Ruby:
host = "http://www.webcode.me"
path = "/index.html/"
result = EFE.request(host, path)
p result
I just get an empty response (with two dashes). no errors.
the example in the demo does use php pages, but I doubt it matters.
here's a sample code from the demo, if that helps:
Ruby:
host = "www.rpgmakervxace.net"
path = "/forum/login.php"
post = "username=kfdsfdsl&password=24324234"
res = EFE.request(host, path, post, 80)
without looking at it it may be because the response is suposed to return a JSON and the sites you're trying to access dont return a JSON response.
 
Last edited:

Chompil

Villager
Member
Joined
Oct 15, 2013
Messages
18
Reaction score
6
First Language
Hebrew
Primarily Uses
thanks, I'll try something which returns JSON
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
445
Reaction score
195
First Language
PT-BR
Primarily Uses
RM2k3
(...)
Ruby:
host = "http://www.webcode.me"
path = "/index.html/"
result = EFE.request(host, path)
p result
Hello, I know it may be because I never used WebKit via RGSS, but it looks like you are treating the INDEX.HTML file as a folder.
Wouldn't it be more correct to remove the bar?
path = "/index.html"
 

Chompil

Villager
Member
Joined
Oct 15, 2013
Messages
18
Reaction score
6
First Language
Hebrew
Primarily Uses
apparently it was both the '/' and the json. thanks ^^
this code works fine, just for reference
Ruby:
host = "date.jsontest.com"
path = ""
post = "?format=json"
result = EFE.request(host, path, post, 80)
 

Latest Threads

Latest Posts

Latest Profile Posts

I won't finish it today, I only will have time to work on that next Saturday, what a shame... :(
I made something for @LittenDev [as he requested]
It's been a weird while. I've been so torn down that even playing video games has been something I avoided. But I shouldn't forget two things. One, I love RPG Maker for a reason. Two, only way to eat an elephant is a bite at a time.
How do people even enjoy RGB keyboard and mouse lighting? It's distracting.

Forum statistics

Threads
111,385
Messages
1,060,710
Members
144,723
Latest member
IsisSwan
Top