How to call a userFunction in the SparkCore from NodeJS?

Hi, is there a way to call a userFunction in the SparkCore from NodeJS?
I know how to do from a website using AJAX/jQuery but how to do it from NodeJS is not clear to me.

Thanks,
Henk

1 Like

The simplest way would be to use http.get(options, [callback]).

2 Likes

Here’s how the CLI (written in Node.JS) does it using the “request” module :slight_smile:

https://github.com/spark/spark-cli/blob/master/js/lib/ApiClient.js#L480

Thanks,
David

2 Likes

@wgbartley and @Dave, thanks for the response. Was a big help, it works now :-).

Henk

1 Like