# Getting a header from post response?

**URL:** <https://community.thunkable.com/t/getting-a-header-from-post-response/2450055>\
**Category:** Web API's\
**Created:** [June 4, 2023, 3:55am UTC](https://community.thunkable.com/t/getting-a-header-from-post-response/2450055 "2023-06-04T03:55:07Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![mcdonaldzacharyaj3o6](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mcdonaldzacharyaj3o6](https://community.thunkable.com/u/mcdonaldzacharyaj3o6)\
**Post date:** [June 5, 2023, 2:22am UTC](https://community.thunkable.com/t/getting-a-header-from-post-response/2450055/7 "2023-06-05T02:22:45Z")

</div>

i found a solution using the web viewer.

```auto
<!DOCTYPE html>
<html>
<head>
  <title>Fetch Request</title>
  <script src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js" type="text/javascript"></script>
</head>
<body>
  <script type="text/javascript">
    // Your JavaScript code here...
    fetch("URL", {
        "method": "POST",
        "headers": {
            "Content-Type": "application/json",
            "Ocp-Apim-Subscription-Key": "my key"
        },
        "body": JSON.stringify({
            "urlSource": "my image location"
        })
    })
    .then(response => {
        const operationLocation = response.headers.get('operation-location');
        // Send the operationLocation to Thunkable:
        ThunkableWebviewerExtension.postMessage(operationLocation);
    })
    .catch(err => {
        // Handle errors here
        console.error(err);
    });
  </script>
</body>
</html>

```

---

_[View the full topic](https://community.thunkable.com/t/getting-a-header-from-post-response/2450055)._
