0rbit is the Lua Module designed for interacting with 0rbit to Access Real World Data into your ao process.
- GET Request: Make a HTTP GET request to any valid URL.
- POST Request: Make a HTTP POST request to any valid URL.
- Receive Response: Receive the response of the request made.
- Balance: Get the balance of 0RBT POINTS of your processId.
-
Open your AOS and
laodAPM blueprint in to your process..load-blueprint apm
-
Install the
0rbitpackage.APM.install("0rbit")
_0rbit = require("0rbit")Copy src/main.lua file and paste it into your directory named as 0rbit.lua.
_0rbit.sendGetRequest(GET_URL)GET_URL: The URL to make a GET request.
_0rbit.sendPostRequest(POST_URL, POST_BODY, POST_HEADERS)POST_URL: The URL to make a POST request.POST_BODY(optional): The body to be sent in POST request.POST_HEADERS(optional): The headers to be sent in POST request.
_0rbit.receiveResponse(msg, onResponse)msg: The message to be received.onResponse(optional): The function to be executed on response. If not provided, it will execute an empty function.
_0rbit.getBalance(address)address(optional): The address of the processId. If not provided, it will take the process Id of the current process.
You can example implementation with 0rbit Package at example file.