# Unable to pass value into the body of post request

**URL:** <https://community.grafana.com/t/unable-to-pass-value-into-the-body-of-post-request/120211>\
**Category:** Grafana k6\
**Tags:** scripts\
**Created:** [April 24, 2024, 5:10pm UTC](https://community.grafana.com/t/unable-to-pass-value-into-the-body-of-post-request/120211 "2024-04-24T17:10:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sonia2024](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sonia2024](https://community.grafana.com/u/sonia2024)\
**Post date:** [April 24, 2024, 5:10pm UTC](https://community.grafana.com/t/unable-to-pass-value-into-the-body-of-post-request/120211/1 "2024-04-24T17:10:32Z")

</div>

I’m new to K6 and trying to create my first script.  
I’ve used K6 browser recorder and converted recoded HAR into script.  
In the script, inside “Group 1” I capture a string that I need to use in “Group 3” but all attempts to pass the string into post request body have failed.  
Here is “Group 3”. When I replay script with option `httpDebug: 'full'` console output shows that `tmp` has correct value but in post request it shows as `SomeID=%24%7Btmp%7D` and request fails.  
What am I doing wrong?

```auto
group('Group 3 - https://something.com/blah/home',
function () {
  const tmp = capturedValue;
  console.log("==================================tmp = ",tmp);
  response = http.post(
    'https://something.com/blah/home',
    {
      FOO: '1',
      BAR: '0',
      Yada: 'Page',
      Blah: '0',
      Number: '1',
      String: 'CAT',
      SomeID: '${tmp}',
      SomeData: '',
    },
    {
      headers: {
        'content-type': 'application/x-www-form-urlencoded',
        referer:
          'https://something.com/blah/origin',
        'user-agent':
          'Mozilla/5.0 etc',
      },
    })

```

---

<div class="post-metadata">

**Author:** ![bandorko](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/bandorko/32/38733_2.png) [@bandorko](https://community.grafana.com/u/bandorko)\
**Post date:** [April 24, 2024, 7:34pm UTC](https://community.grafana.com/t/unable-to-pass-value-into-the-body-of-post-request/120211/2 "2024-04-24T19:34:11Z")

</div>

Hi @sonia2024 , welcome to the community forum!

%24%7Btmp%7D is the urlencoded form of the ‘${tmp}’ string, I think, you just have to use simply

```auto
SomeID: tmp,

```

I hope this helps
