Function Introduction

When editing a test plan in JMeter, if there are multiple Sampler requests with the same parameters and settings, such as the protocol, IP address, and port number of the service being requested, configuring each Sampler individually would increase redundancy and workload. Additionally, if the server address changes in the future, it would be cumbersome to modify each one.
The HTTP Request Defaults configuration element allows you to configure these repetitive settings together, so other Sampler request elements do not need to be configured again.

Parameter Description

The commonly used settings are basic settings; advanced settings can be left unconfigured.
The basic parameters are described as follows:
Protocol: http or https
Server or IP: The name or IP address of the server where the software is located
Port Number: The port number where the HTTP service software to be tested is located
Path: The path of the request
Content Encoding: It is recommended to set it to UTF-8
Parameters: Set the default request parameter values
Message Body Data: Set the default message body data
Only one of parameters and message body data can be set; both cannot be set simultaneously.

Advanced Settings

Implementation: Java, HttpClient4. If not specified, the default value depends on the JMeter property JMeter.httpsampler; otherwise, the Java implementation will be used.
Connection: Connection timeout, the number of milliseconds to wait for the connection to open.
Response: Response timeout, the number of milliseconds to wait for a response.
Get all contained resources from HTML files: Instructs JMeter to parse the HTML file and send HTTP/HTTPS requests for all images, applets, JavaScript files, CSS, etc., referenced in the file.
The network must match: If present, this must be a regular expression used to match any embedded URLs found. Therefore, if you only want to download embedded resources from http://AAA.b/, use the following expression: http://AAA.b/.*
The network must not match: If present, this must be a regular expression used to filter out any embedded URLs found. Therefore, if you do not want to download PNG or SVG files from any source, use the expression: .*\.(?i:svg|png)
Proxy Server: The hostname or IP address of the proxy server that performs the request. [Do not include the http:// prefix.]
Save Response as MD5 Hash: The response message is encrypted using MD5.

