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

Mouse Coordinates + Common Events, Custom Actor Parameters & Fantasy Beasts | RPG Maker News #32

Winter Cover.png
Peeps, can we just take some time to appreciate the mods here? They're so friendly, and they're always there for us when we need help. Now that I've been here for two years, I want to thank the mods and admins for keeping it positive here on the forum. They're the reason I've stayed so long! Here's to you!
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 ._.

Forum statistics

Threads
111,122
Messages
1,058,507
Members
144,345
Latest member
wolfr136a1
Top