Making requests
To make a request, there's a method called request
available in every session or engine instance using Blurr. It accepts a JavaScript object as an argument to support compatibility with JSON and make it web-friendly.
The following is an example:
let response = await blurr.request({ operation: "createDataframe", dict: { id: [0, 1, 2, 3], value: [1.5, 2.25, 11, 12.5] }, saveTo: "df" });
We used await
to wait for the value of the promise. The.then()
method can be used as well. Either way, depending on the request, you may get the same response – either a complete response or a status of what was changed. If we check the content of response
after running the previous code, we'll get the following result:
{ status...