Hi,
i try to use it in a real example , i can see in the javascript
console of web browser that it succeeded in isuuing a GET command and
fetched the remote file but then i cannot display the string or even
display the string-length ???
here is my example:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>BiwaScheme example</title>
</head>
<body>
<div id="bs-console">
</div>
<script src="biwascheme.js">
(print "Hello, world!")
(print (current-date))
;;(define wp (http-request
"
http://ad.usno.navy.mil/wds/Webtextfiles/wdsnewref.txt"))
(define wp "the string")
;;(define wp (http-request "
https://sidonie2.oca.eu/Sidonie/Default.htm"))
(print (string-length wp))
(set! wp (http-request
"
http://ad.usno.navy.mil/wds/Webtextfiles/wdsnewref.txt"))
(print (string-length wp))
(print "---------------------------")
(console-log "ok.")
</script>
</body>
</html>
here is my output:
Hello, world!
Fri Mar 03 2017 15:40:15 GMT+0100 (CET)
10
nothing more!
regards,
damien
On 2/11/17, Yutaka Hara <
yutak...@gmail.com> wrote:
> Hi,
>
> There is a function named `http-request'. It takes the path to the remote
> file, fetches
> its content and returns it as a string. For example, this will show the
> content of index.html
> in the developer console.
>
> (console-log (http-request "index.html"))
>
> 2017-02-09 17:07 GMT+09:00 Damien Mattei <
damien...@gmail.com>:
>
>> Hi,
>>
>> is there a way to download a remote file in BiwaScheme having is URL.
>> This is for getting an html page that will be parsed to construct a menu
>> list in another page.
>> The job will be done in the browser not on server side.
>>
>> regards,
>> Damien
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "BiwaScheme" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to
biwascheme+...@googlegroups.com.
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "BiwaScheme" group.