H3C Technologies H3C S6300 Series Switches User Manual
Page 150
137
The status code of the HTTP packet is a three-digit field in decimal notation, and it includes the status
information for the HTTP server. The first digit defines the class of response, and the last two digits do not
have any categorization role.
Configure the HTTP server before you perform the HTTP operation.
To configure the HTTP template:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Create an HTTP template and
enter its view.
nqa template http name N/A
3.
Specify the URL of the
destination HTTP server.
url url
Enter the URL in one of the following
formats:
•
http://host/resource.
•
http://host:port/resource.
4.
Specify an HTTP login
username.
username username
By default, no HTTP login username is
specified.
5.
Specify an HTTP login
password.
password { cipher | simple }
password
By default, no HTTP login password is
specified.
6.
Specify the HTTP operation type. operation { get | post |
raw }
By default, the HTTP operation type is
get, which means obtaining data from
the HTTP server.
In the HTTP raw operation, use the
raw-request command to specify the
content of the GET request to be sent to
the HTTP server.
7.
(Optional.) Enter raw request
view.
raw-request
This step is required for the raw
operation.
Every time you enter the raw request
view, the previously configured content
of the GET request is removed.
8.
(Optional.) Enter or paste the
content of the GET request for
the HTTP operation.
N/A
This step is required for the raw
operation.
By default, no contents are specified.
9.
(Optional.) Save the input and
exit to HTTP template view.
quit
N/A
10.
(Optional.) Specify the source
IPv4 or IPv6 address for the
probe packets.
•
IPv4 address:
source ip ip-address
•
IPv6 address:
source ipv6 ipv6-address
By default, no source IP address is
specified.
The source IP address must be the IP
address of a local interface, and the
interface must be up. Otherwise, no
probe packets can be sent out.
11.
(Optional.) Configure the
expected status codes.
expect status status-list
By default, no expected status code is
configured.
12.
(Optional.) Configure the
expected data.
expect data expression
[ offset number ]
By default, no expected data is
configured.