# Is it possible to make a new http request with the data in the responsebody?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-make-a-new-http-request-with-the-data-in-the-responsebody/196105>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [August 21, 2019, 12:17pm UTC](https://discuss.elastic.co/t/is-it-possible-to-make-a-new-http-request-with-the-data-in-the-responsebody/196105 "2019-08-21T12:17:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ISKU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/isku/32/52706_2.png) [@ISKU](https://discuss.elastic.co/u/ISKU)\
**Post date:** [August 21, 2019, 12:17pm UTC](https://discuss.elastic.co/t/is-it-possible-to-make-a-new-http-request-with-the-data-in-the-responsebody/196105/1 "2019-08-21T12:17:38Z")

</div>

Hi.  
I want to make two http requests.  
Get the json data of the response body from the first request,  
I want to use that json data as the value of the header of the second request.

For example:

```auto
name: http
schedule: '* * * * *'
urls: ["http://my-first-url.kr"]
check.request:
    method: "POST"
check.response:
    status: 200
    json:
        condition:
            equals:
                myField: '{ myKey: abcd-efgh-defg}'

```

In the first request I get **myKey** from the response body.

```auto
name: http
schedule: '* * * * *'
urls: ["http://my-second-url.kr"]
check.request:
    method: "POST"
    headers:
        'myKey': 'abcd-efgh-defg'
check.response:
    status: 200

```

And I want to make this second request with this **myKey** in the header.

I want to combine these two requests into one.  
Is this possible in heartbeat?  
If not, can I register issues to add new features to GitHub?

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [August 21, 2019, 2:15pm UTC](https://discuss.elastic.co/t/is-it-possible-to-make-a-new-http-request-with-the-data-in-the-responsebody/196105/2 "2019-08-21T14:15:31Z")

</div>

Unfortunately we don't support this today, but yes, please open an issue for this feature! It makes the most sense to open the issue on our uptime repo here: [https://github.com/elastic/uptime](https://github.com/elastic/uptime)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 18, 2019, 2:15pm UTC](https://discuss.elastic.co/t/is-it-possible-to-make-a-new-http-request-with-the-data-in-the-responsebody/196105/3 "2019-09-18T14:15:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
