I tried to run the fetch example (https://github.com/mongoose-os-apps/http-fetch).
I run it, without any change and try to write to a file.
Checking the result afterwards (FS.ListExt), I can see the new file, but with a length of 0!
[
{
“name”: “conf0.json”,
“size”: 3
},
{
“name”: “x.json”,
“size”: 0
}
]
$ mos call Fetch '{"url": "http://mongoose-os.com/downloads/mos/version.json", "file": "x.json"}'
Using port COM28
Error: /src/cli/dev/dev_conn_impl.go:171: remote error -1:
/src/cli/dev/dev_conn_impl.go:180:
/src/cli/main.go:198: call failed
$ mos ls -l
Using port COM28
ca.pem 30849
conf0.json 3
x.json 0
After configuring wifi
$ mos call Fetch '{"url": "http://mongoose-os.com/downloads/mos/version.json", "file": "x.json"}'
Using port COM28
{
"written": 141
}
$ mos ls -l
Using port COM28
ca.pem 30849
conf0.json 3
conf9.json 194
x.json 141