curl and assume a RequestScript server at http://localhost:3000. Replace that with your server’s address, and add any authentication headers your server requires.
1
Run a request
Send a The server runs the script once and returns the value it returned under
request script as the plain-text body of POST /run:returnValue:2
Add some logic
Scripts can declare variables, compute values and branch:
3
Save a contract
A contract is a named script with parameters that the server stores for later. Save one with The server responds with
POST /contracts:201 Created and the contract’s details:4
Invoke the contract
Invoke the contract by posting its parameters as JSON to
/run/<path>/<Name>. The dots in the contract’s path become slashes in the URL:Next steps
- Learn the language, starting with Syntax.
- Call server-provided functions with resources.
- See every endpoint in the HTTP API reference.