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,378
Reaction score
5,537
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
433
Reaction score
190
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 Profile Posts

I don't even know if I'm going to USE all these maps in my game, I just like making maps...
Huh. A forum topic just pointed out to me one MV->MZ difference I hadn't registered previously: the skill/item use message in MZ doesn't have the actor name hardcoded at the beginning like MV did, so you have more control over having stuff come before it.
1620833447825.png
This is one of the most beautiful art styles I've seen... it's also the style I draw in... er.... what's this style called...?
Ami
This is the End of the Endurance,everyone are celebrating the end of their Endurance

I just wondering what Menu for Tomorrow

Forum statistics

Threads
111,290
Messages
1,059,986
Members
144,604
Latest member
Greerenz
Top