[GH-ISSUE #240] Issue on docs #65

Closed
opened 2026-03-16 12:23:19 +03:00 by kerem · 1 comment
Owner

Originally created by @tommihietanen on GitHub (Sep 4, 2024).
Original GitHub issue: https://github.com/hoppscotch/docs/issues/240

Path: /documentation/getting-started/rest/pre-request-scripts

You can use the pre-request script for a pre-processing task such as:

Setting parameters, headers.
Adding body data.
Adding variable values.
Including timestamps in request headers.

Example for setting headers from envs via pre-request script is needed.
There is no access to request in the pre-request scripts.

Originally created by @tommihietanen on GitHub (Sep 4, 2024). Original GitHub issue: https://github.com/hoppscotch/docs/issues/240 Path: /documentation/getting-started/rest/pre-request-scripts --- You can use the pre-request script for a pre-processing task such as: Setting parameters, headers. Adding body data. Adding variable values. Including timestamps in request headers. --- Example for setting headers from envs via pre-request script is needed. There is no access to request in the pre-request scripts.
kerem closed this issue 2026-03-16 12:23:24 +03:00
Author
Owner

@liyasthomas commented on GitHub (Sep 4, 2024):

Hi @tommihietanen, you can use environment variables in the Headers tab as usual and
before executing a request, you can use pre-request scripts to set its values at run-time.

Screenshot 2024-09-04 at 8 04 14 PM Screenshot 2024-09-04 at 8 04 24 PM
<!-- gh-comment-id:2329245089 --> @liyasthomas commented on GitHub (Sep 4, 2024): Hi @tommihietanen, you can use environment variables in the Headers tab as usual and before executing a request, you can use pre-request scripts to set its values at run-time. <img width="1078" alt="Screenshot 2024-09-04 at 8 04 14 PM" src="https://github.com/user-attachments/assets/d6dd044b-6b1c-4bec-a23f-5bedd1c785aa"> <img width="1078" alt="Screenshot 2024-09-04 at 8 04 24 PM" src="https://github.com/user-attachments/assets/d90c737c-b067-42f5-8c21-fc4a321412f5">
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docs#65
No description provided.