# Access request.data after variables are injected

**URL:** <https://community.postman.com/t/access-request-data-after-variables-are-injected/2969>\
**Category:** Help Hub\
**Created:** [October 11, 2018, 4:19am UTC](https://community.postman.com/t/access-request-data-after-variables-are-injected/2969 "2018-10-11T04:19:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![haydenhancock](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/haydenhancock/32/1004_2.png) [@haydenhancock](https://community.postman.com/u/haydenhancock)\
**Post date:** [October 11, 2018, 4:19am UTC](https://community.postman.com/t/access-request-data-after-variables-are-injected/2969/1 "2018-10-11T04:19:22Z")

</div>

Is it possible to access the request.data object in the Pre-request Script section after variables are injected?

Use Case: Hash request.data, which is JSON that contains Postman variables. I am then using this hashed value in a request header (required for authentication).

Problem: When I attempt to hash the request.data it hashes the Postman variable instead of the value.

**Environment variables**  
my\_postman\_variable = someUserId

**Example JSON**  
{ “userId”: {{my\_postman\_variable}} }

**Expected output**  
request.data = { “userId”: “someUserId” }

**Actual output**  
request.data = { “userId”: {{my\_postman\_variable}} }

---

<div class="post-metadata">

**Author:** ![haydenhancock](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/haydenhancock/32/1004_2.png) [@haydenhancock](https://community.postman.com/u/haydenhancock)\
**Post date:** [April 30, 2019, 6:43pm UTC](https://community.postman.com/t/access-request-data-after-variables-are-injected/2969/2 "2019-04-30T18:43:07Z")

</div>

Is there no answer for this?

---

<div class="post-metadata">

**Author:** ![matt](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/matt/32/2562_2.png) [@matt](https://community.postman.com/u/matt)\
**Post date:** [April 30, 2019, 11:35pm UTC](https://community.postman.com/t/access-request-data-after-variables-are-injected/2969/3 "2019-04-30T23:35:29Z")

</div>

Would it be possible for you to share your Pre-Request Script here so we can have a little more context for what you’re doing?
