There's a few directions I can point you in, and hopefully be of some
assistance.
Generally, Sandstorm apps are blocked from having arbitrary HTTP access
to external resources. Since a big point of Sandstorm is sandboxing apps
so they can't misbehave without permission, there is not really a
"simple way" to allow your app to make any GET/POST requests to any
websites it wants.
You can probably still use the way TinyTinyRSS does it for now, but that
method is likely to get replaced and eventually blocked off for newer
apps, as it is a hack. It has a method called HttpGet that uses a
intentional hole in Sandstorm to get arbitrary HTTP:
https://github.com/jparyani/Tiny-Tiny-RSS/blob/sandstorm/sandstorm/sandstorm-httpGet.c%2B%2B
The new method is to make a Powerbox request, where the user grants the
app permission to talk to external apps or services. I do not think
anyone is using this yet for arbitrary HTTP access, and I am not sure
whether or not you can yet. But the goal is that as part of say adding a
site that you want to access, you'd grant the app access to connect to
it with a permission the user would be able to revoke:
https://docs.sandstorm.io/en/latest/developing/powerbox/
One of the features of the Powerbox I do know IS being used by an app is
an IpNetwork capability, also mentioned on the page above, which simply
does grant your app arbitrary network access on all ports. The big
downside to this one, is that currently only the admin of a Sandstorm
server can grant that permission, so it can only be used on your own
Sandstorm server. The app using this method currently is:
https://github.com/zenhack/sandstorm-znc
There is a stayAwake method in the Sandstorm API for keeping your app
open, though if I recall, there is no way to make it automatically come
back after a restart of the Sandstorm server:
https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/grain.capnp#L101
--
Jacob Weisz
in...@jacobweisz.com
> --
> You received this message because you are subscribed to the Google Groups
> "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
sandstorm-de...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/sandstorm-dev/c64343ef-bd0a-f4e3-7320-b5d9ad15ee2b%40insa-lyon.fr.
> For more options, visit
https://groups.google.com/d/optout.