# How can you make HTTP Header Dynamic?

**URL:** <https://forum.katalon.com/t/how-can-you-make-http-header-dynamic/41966>\
**Category:** API Testing\
**Tags:** api-testing, katalon-studio\
**Created:** [April 7, 2020, 3:13am UTC](https://forum.katalon.com/t/how-can-you-make-http-header-dynamic/41966 "2020-04-07T03:13:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkhan](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mkhan](https://forum.katalon.com/u/mkhan)\
**Post date:** [April 7, 2020, 3:13am UTC](https://forum.katalon.com/t/how-can-you-make-http-header-dynamic/41966/1 "2020-04-07T03:13:05Z")

</div>

For one of my headers (externalReferenceID) I want to make it dynamic to always generate a new string of numbers. First off, is there a simple solution to apply dynamic variables like Postman?

I tried applying this approach in the following link, but it doesn’t seem to be connecting to the test case, any insight what I could be missing?

> [@POST with references](http://forum.katalon.com/t/post-with-references/13281/6#Comment_22757):
>
> [Andrej Podhajský](https://forum.katalon.com/profile/2584/Andrej%20Podhajsk%C3%BD) said: i don’t test this for myself yet, but from what i read, you should define variables in request object, put them in request body and then when calling request object fill those variables like e.g. in WebObject… post body will be {… “filter1”: ${VARIABLE\_F1} … “filter50”: ${VARIABLE\_F50} } and call : WS.sendRequest(findTestObject(‘New Request’, [(‘VARIABLE\_F1’) : localTestCaseVariable1,(‘VARIABLE\_F50’) : localTestCaseVariable50])) P.S.: see? [Image: https://s3.am…

also here are images below of my following execution.

 ![HTTPHeader1](https://europe1.discourse-cdn.com/katalon/original/2X/6/686271b30b700c4e9184ec141795b4b61d92c8bf.png)  
 ![HTTPHeader2](https://europe1.discourse-cdn.com/katalon/original/2X/7/781674ee7defd75b7d06db182ca0e4cf823b2be7.png)  
 ![HTTPHeader3](https://europe1.discourse-cdn.com/katalon/original/2X/c/cc7e3fe6499c37cd162bac700cb0531ef8fd4180.png)  
 ![HTTPHeader4](https://europe1.discourse-cdn.com/katalon/original/2X/2/2e053f3ffba8f641ca053e76f780b51f4cd48a31.png)  
 ![HTTPHeader5](https://europe1.discourse-cdn.com/katalon/original/2X/e/ec0b44c8ed3784619656cc1cdbed2e10dcdf4787.png)

---

<div class="post-metadata">

**Author:** ![huynguyen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/huynguyen/32/552_2.png) [@huynguyen](https://forum.katalon.com/u/huynguyen)\
**Post date:** [April 7, 2020, 4:13pm UTC](https://forum.katalon.com/t/how-can-you-make-http-header-dynamic/41966/2 "2020-04-07T16:13:05Z")

</div>

You can use, for example, ${System.currentTimeMillis}

---

<div class="post-metadata">

**Author:** ![mkhan](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mkhan](https://forum.katalon.com/u/mkhan)\
**Post date:** [April 7, 2020, 5:07pm UTC](https://forum.katalon.com/t/how-can-you-make-http-header-dynamic/41966/3 "2020-04-07T17:07:04Z")

</div>

> [@huynguyen](#):
>
> ${System.currentTimeMillis}

Thanks huy!!! do I put this in my default → GlobalVariable (externalReferenceID) and is so value type string?

---

<div class="post-metadata">

**Author:** ![huynguyen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/huynguyen/32/552_2.png) [@huynguyen](https://forum.katalon.com/u/huynguyen)\
**Post date:** [April 16, 2020, 5:29pm UTC](https://forum.katalon.com/t/how-can-you-make-http-header-dynamic/41966/4 "2020-04-16T17:29:37Z")

</div>

Hi @mkhan,  
Just put it in place of ${externalReferenceID}

---

<div class="post-metadata">

**Author:** ![sandeepsharmaqa1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/sandeepsharmaqa1/32/30227_2.png) [@sandeepsharmaqa1](https://forum.katalon.com/u/sandeepsharmaqa1)\
**Post date:** [June 19, 2025, 1:42am UTC](https://forum.katalon.com/t/how-can-you-make-http-header-dynamic/41966/5 "2025-06-19T01:42:32Z")

</div>

> [@huynguyen](#):
>
> {System.currentTimeMillis}

is this issue is resolved?
