Oracle & HTTP Call

An oracle helps you to do external HTTP calls to an API.
  • You can register an oracle with only one line of code:
oracle(name, permission, base_url).
oracle(coindesk, r, '').
  • The oraclenamemust be in snake_case OR camelCase
  • The second parameter should always ber(only READ permission is available ATM)
  • Then, you must use the get_http() predicate whenever you want to get data from the oracle:
get_http(oracle_name, path, Output).
prompt :-
get_http(coindesk, '/currentprice.json', Output),
set(coindesk, Output).
The Output name must be in PascalCase.