- Subscribe to RSS Feed
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content
How do I override the value of the HTTP “Host” header in requests?
|
|
|
|
For HTTP(s) targets, the Target Editor > Advanced Settings section includes an HTTP “Host” Header Override. This field is used in such cases to override the host header for all messages based on the given HTTP target. To use this field, open the given HTTP target in the Target Editor, navigate to the Advanced Settings section and then enter the valid host name in the field as an URL and then save the target. |
|
|
The HTTP host override can also be set on the Target via the Composition Editor > Track (per track name) properties > HttpHostOverride field. |
|
|
HTTP host overrides can also be performed via placement of a script calling the CloudTest system property, Note that changing the value of the system property via the UI method, or via the deprecated script method, causes only the value in the HTTP “Host” header to be changed, and does not affect the actual location to which the requests are being sent. This system property can be used to set the value that is sent in the HTTP “Host” header to the host name that the application is expecting. Changing the value of the |
|
|
Use the following steps to override host file(s) for a test using a script instead of the user interface. |
|
|
|
|
The script will take the value in the Target’s location, whatever it is, an IP or a domain name, and replace it at runtime with the value entered. |
|
Refer to Setting and Using Message Scope for more information about message scope.
|
|
|
When the test composition is played, the host of the target will be overwritten with the system property set in the script. You can verify this substitution in the Composition Editor > Results tab > Result Details widget by selecting the target in the cover flow at the top and then clicking the Events List tab. |
![]() |



local or
public.

