# How do I make a baseUrl mimic a curl with a host header destination in Postman?

**URL:** <https://community.postman.com/t/how-do-i-make-a-baseurl-mimic-a-curl-with-a-host-header-destination-in-postman/38825>\
**Category:** Help Hub\
**Tags:** variables, collections\
**Created:** [September 3, 2022, 3:27pm UTC](https://community.postman.com/t/how-do-i-make-a-baseurl-mimic-a-curl-with-a-host-header-destination-in-postman/38825 "2022-09-03T15:27:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpeezus](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jpeezus](https://community.postman.com/u/jpeezus)\
**Post date:** [September 3, 2022, 3:27pm UTC](https://community.postman.com/t/how-do-i-make-a-baseurl-mimic-a-curl-with-a-host-header-destination-in-postman/38825/1 "2022-09-03T15:27:43Z")

</div>

As part of my testing I use a curl to a network device and I pass in a host header of a web server name. The network device proxies for this device so it receives the traffic and looks at the host header and forwards the traffic to the web server. How can I get this same functionality using Postman? Normally I go in and edit my local host file to force DNS when using postman but I would like to avoid that. Can post man make requests similar to that curl?

curl -ik [https://network-appliance-ip](https://network-appliance-ip) -H "host:web-server-destination

---

<div class="post-metadata">

**Author:** ![jpeezus](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jpeezus](https://community.postman.com/u/jpeezus)\
**Post date:** [September 3, 2022, 3:43pm UTC](https://community.postman.com/t/how-do-i-make-a-baseurl-mimic-a-curl-with-a-host-header-destination-in-postman/38825/2 "2022-09-03T15:43:43Z")

</div>

I figured it out. Set the baseURL and the pre request scripts at the collection level.

Set the baseUrl variable first  
the set the pre-request script

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [December 12, 2024, 12:52pm UTC](https://community.postman.com/t/how-do-i-make-a-baseurl-mimic-a-curl-with-a-host-header-destination-in-postman/38825/3 "2024-12-12T12:52:20Z")

</div>

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