Hi everyone! We just released the new Ares beta version, but what is it about?
As you know, a few weeks ago, @lastmjs announced that you can build REST APIs with Azle; that’s quite a big announcement! (personally, I’d love it).
However, signing the requests using Internet Identity and those APIs is not possible.
Ares is an Axios-like library that enables REST API requests but integrates Internet Identity (or any similar identity).
To use it you only need two things:
A REST API in Azle (or any other REST API that complies with the .did that Azle generates).
Install the @bundly/ares library inside your frontend project. npm install @bundly/ares
How it works?
const response = await ares<TestResponse>({
URL: "http://your_canister_id.localhost:4943/test",
method: "POST",
data: {
hello: "world",
},
headers: {
"Content-Type": "application/json",
},
// Here you can provide your identity
identity
});
We are working on improving the documentation, but it should work much like Axios. We try to be familiar with existing REST API client libraries.
We would like to receive your feedback and any issue reports. Remember this still in Beta, but we will keep working to improve it.