# How to use axios in cloud bot

**URL:** <https://community.yellow.ai/t/how-to-use-axios-in-cloud-bot/4108>\
**Category:** Studio\
**Created:** [April 17, 2023, 6:28am UTC](https://community.yellow.ai/t/how-to-use-axios-in-cloud-bot/4108 "2023-04-17T06:28:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aditya\_Trivedi1](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.yellow.ai/aditya_trivedi1/32/2793_2.png) [@Aditya\_Trivedi1](https://community.yellow.ai/u/Aditya_Trivedi1)\
**Post date:** [April 17, 2023, 6:28am UTC](https://community.yellow.ai/t/how-to-use-axios-in-cloud-bot/4108/1 "2023-04-17T06:28:45Z")

</div>

Is there any way to implement the below code in cloud function.

```auto
 const { promisifiedRequest } = await app.executeFunction("utility");
        let imageurl = app.data.image
        app.getBase64Document = await function (url) {
            return app.axios.get(url, {
                responseType: 'arraybuffer',
                dontRedirect: true
            }).then(response => Buffer.from(response.data, 'binary').toString('base64'))
        }
        await app.fileRequest.get(app.data.image, async (error, response, body) => {

```
