# How to make HTTP request to the logic app

**URL:** <https://community.thunkable.com/t/how-to-make-http-request-to-the-logic-app/2968226>\
**Category:** Web API's\
**Tags:** help\
**Created:** [April 25, 2024, 7:49am UTC](https://community.thunkable.com/t/how-to-make-http-request-to-the-logic-app/2968226 "2024-04-25T07:49:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![b511thegoldenboyu0](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/b511thegoldenboyu0/32/174831_2.png) [@b511thegoldenboyu0](https://community.thunkable.com/u/b511thegoldenboyu0)\
**Post date:** [April 25, 2024, 7:49am UTC](https://community.thunkable.com/t/how-to-make-http-request-to-the-logic-app/2968226/1 "2024-04-25T07:49:23Z")

</div>

Hi there everyone, i have a question. How to make http request to the logic app which is the azure service while you have http URL and the body content to be in image bas64 format and get response.

---

<div class="post-metadata">

**Author:** ![b511thegoldenboyu0](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/b511thegoldenboyu0/32/174831_2.png) [@b511thegoldenboyu0](https://community.thunkable.com/u/b511thegoldenboyu0)\
**Post date:** [April 25, 2024, 7:02pm UTC](https://community.thunkable.com/t/how-to-make-http-request-to-the-logic-app/2968226/2 "2024-04-25T19:02:54Z")

</div>

I HAVE MAKE THE FOLLOWING BLOCKS

 ![CAPTURE 1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/4/f4a4981d30017631609776810bf4689ed4e10cd1.png)  
FOR MAKING HTTP REQUEST BUT I AM GETTING ERROR HOW CAN I MODIFY THEM

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [April 25, 2024, 11:13pm UTC](https://community.thunkable.com/t/how-to-make-http-request-to-the-logic-app/2968226/3 "2024-04-25T23:13:08Z")

</div>

Hello @b511thegoldenboyu0  
Please check this post: [WEB API Firebase Storage It does not upload the file to the server - Questions about Thunkable / Web API’s - Community](https://community.thunkable.com/t/web-api-firebase-storage-it-does-not-upload-the-file-to-the-server/2369895)

---

<div class="post-metadata">

**Author:** ![b511thegoldenboyu0](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/b511thegoldenboyu0/32/174831_2.png) [@b511thegoldenboyu0](https://community.thunkable.com/u/b511thegoldenboyu0)\
**Post date:** [April 29, 2024, 6:32am UTC](https://community.thunkable.com/t/how-to-make-http-request-to-the-logic-app/2968226/4 "2024-04-29T06:32:29Z")

</div>

Thanks, it has helped me but i have a question how can i use button component to send image to web viewer and get it base64 format without using button from web viewer itself.

---

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [April 30, 2024, 10:19am UTC](https://community.thunkable.com/t/how-to-make-http-request-to-the-logic-app/2968226/5 "2024-04-30T10:19:35Z")

</div>

You can this Code for HTML Extension in Web Viewer, Send Image URL by Web Viewer Post Message, and Receive the Base64 by Web Viewer when receiving Message Block.

```auto
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js" type="text/javascript"></script>
<title>Image URL to Base64 Converter</title>
<style>
    body {
        font-family: Arial, sans-serif;
    }
    .container {
        max-width: 600px;
        margin: 0 auto;
        padding: 20px;
    }
    #result {
        white-space: pre-wrap;
    }
</style>
</head>
<body>
<div class="container">
    <h1>Image URL to Base64 Converter</h1>
    <button onclick="convertToBase64()">Convert Default Image</button>
    <div id="result"></div>
</div>

<script>
ThunkableWebviewerExtension.receiveMessage(function(message) {
    var imageUrl = message; 
    convertToBase64()
    });
function convertToBase64() {
    var imageUrl = "https://res.cloudinary.com/di751ehfz/image/upload/v1713357051/zpmd4t3bpwklyds6maga.png";
    var img = new Image();
    img.crossOrigin = 'Anonymous';
    img.onload = function() {
        var canvas = document.createElement('canvas');
        canvas.width = this.width;
        canvas.height = this.height;
        var ctx = canvas.getContext('2d');
        ctx.drawImage(this, 0, 0);
        var base64 = canvas.toDataURL('image/png');
        document.getElementById('result').textContent = base64;
        ThunkableWebviewerExtension.postMessage(base64);
    };
    img.onerror = function() {
        alert('Error loading the image. Please check the URL.');
    };
    img.src = imageUrl;
}
</script>
</body>
</html>

```

* * *

Want to hire a Certified Thunkable Expert? [Whoocoder | Thunkable Expert | Order Now On Fiver!!](https://pro.fiverr.com/certified/thunkable?utm_source=fiverr_certified&utm_medium=homepage&utm_campaign=certified_home&service=thunkable-project&active_expert_id=147498421)
