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,356
Reaction score
5,524
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
17
Reaction score
5
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
402
Reaction score
178
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

If it gets 6 degrees hotter we've reach 100
I am finally done making the 'superbosses' in my game!
I'm happy because oh my gosh they were a lot of work, but I'm also sad because I love database work... And also because I loved making stupid powerful bosses ._.
Question for anyone who reads Slip into Ruby or Jump into Javascript: do I sometimes get too "explainy" with the methods/functions? Would it be more useful if I stuck to explaining what the code is doing rather than also delving into minutiae of the technical side of it?
That moment when you try to figure out a color scheme for an alien ship so that it's something other than "Grey on Grey".
It's up for viewing! See what happened when EquestriAlert got tested in 1997... or was it a test? Did somepony hack the system? Or did somepony push the wrong switch? Even Adagio Dazzle (the owner of the channel) has no clue.

Can you put the pieces together? Don't worry, the game isn't over yet! There's more pieces to add on!

Forum statistics

Threads
111,118
Messages
1,058,460
Members
144,338
Latest member
shadowsoul
Top