http get
Parameters
Parameter | Description | Value |
---|---|---|
-a source-ip-address | Specifies the source IP address of outgoing HTTP request packets. If this parameter is not specified, the IP address of the outbound interface is used as the source IP address of outgoing HTTP request packets. |
The value is in dotted decimal notation. |
-c count | Specifies the transmission count of HTTP request packets. If the network works unstably, increase the transmission count to detect network quality based on the packet loss ratio. |
The value is an integer ranging from 1 to 100. The default value is 5. |
-t timeout | Specifies the timeout interval for an HTTP response packet. The http get command sends an HTTP request packet to an address and waits for a response. If the response is received within the timeout interval, the destination is reachable. If no response is received within the timeout interval, the sender displays a message indicating that the request packet times out. A response is received within 1 to 10 seconds after an HTTP request packet is sent. If the transmission speed is low, properly prolong the timeout interval. |
The value is an integer that ranges from 1 to 65535, in milliseconds. The default value is 5000 ms. |
-v http-version | Specifies the HTTP version number. | The HTTP version number is 1.0 or 1.1. The default value is 1.0. |
url url | Specifies the destination URL. | The value is a string of 1 to 256 characters. |
Usage Guidelines
- Whether the HTTP service is enabled on the URL server
- Round-trip delay in communication
- Packet loss
Example
# Check whether the HTTP service is enabled on the URL server with the URL of http://w3.huawei.com, and set the source IP address of outgoing HTTP packets to 10.137.147.142, the transmission count to 5, the period for waiting for a response packet to 100 ms, and the HTTP version number to 1.1.
<AC6605> system-view
[AC6605] http get -a 10.137.147.142 -c 5 -t 100 -v 1.1 url http://w3.huawei.com
Http getting http://w3.huawei.com[10.82.55.199]: 1:packets interaction time 90 ms,the link reachable 2:packets interaction time 100 ms,the link reachable 3:packets interaction time 100 ms,the link reachable 4:packets interaction time 100 ms,the link reachable 5:packets interaction time 90 ms,the link reachable --http get result statistics-- Http Get 5 time(s),succeed 5 time(s),failed 0 time(s). round-trip min/avg/max = 90/96/100 ms
Item |
Description |
---|---|
Http getting x.x.x |
URL and IP address of the URL server. |
x:packets interaction time x ms,the link reachable |
Response to each HTTP packet.
|
http get result statistics |
HTTP test statistics:
|