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...