-->
Page 1 of 5

wget and load function not working

PostPosted: Sun Mar 20, 2016 5:04 am
by kingedem
Hi Micheal,

I found following 2 issues with new version ESP Basic 1.89.

1. "wget" function not fetching html string from URL ("example.com").
2. "load" function not working.

Thanks.

Re: wget and load function not working

PostPosted: Sun Mar 20, 2016 10:38 am
by Mmiscool
Just uploaded a new build fixing the problems you identified.

After some testing also noticed the following.

Also I noticed that you must add a slash at the end of the url it it is just a naked domain name. IE
print wget("example.com/") not wget("example.com")


With out the slash at the end there or a proper page name it responded with a "400 Bad request". Adding the slash returned a proper page.


Load now needs the full path to the script you wish to run.

ie. LOAD "\myscript.bas"or LOAD "\uploads\myscript.bas"

Re: wget and load function not working

PostPosted: Sun Mar 20, 2016 11:31 am
by kingedem
Micheal,

Version 1.90

load function working as per your below detail mentioned : load "/file.bas"

but, wget still not working ... it returning "</html>" ...

i am using following code:

[sub1]
var1 = wget("myurl.com/")
wprint var1
wait



Mmiscool wrote:Just uploaded a new build fixing the problems you identified.

After some testing also noticed the following.

Also I noticed that you must add a slash at the end of the url it it is just a naked domain name. IE
print wget("example.com/") not wget("example.com")


With out the slash at the end there or a proper page name it responded with a "400 Bad request". Adding the slash returned a proper page.


Load now needs the full path to the script you wish to run.

ie. LOAD "\myscript.bas"or LOAD "\uploads\myscript.bas"

Re: wget and load function not working

PostPosted: Sun Mar 20, 2016 12:07 pm
by Mmiscool
It will return the html of a web page if that page consists of html.

Can you give me a good exmple of a url you are trying to fetch and the expected result you are looking for?