How does the Linux system simulate the get or post request of Http?

  

The Http request refers to the client's request message to the server. The Http request is mainly divided into get or post. In the Linux system, the curl and wget commands can be used to simulate the Http request. Let's talk about how the Linux system simulates the get or post request of Http.

a, get request:

1, using the curl command:

curl & ldquo; http: //www.baidu.com” if the URL points to where A file or a picture can be downloaded directly to the local

curl -i “http://www.baidu.com” Show all information

curl -l “http ://www.baidu.com” Only show head information

curl -v “http://www.baidu.com” Display get request full process resolution

2, use Wget command:

wget “http://www.baidu.com”also available

Second, post request

1, use the curl command (via the -d parameter , put the access parameters in it):

curl -d “param1=value1¶m2=value2” “http://www.baidu.com”

2, use wget Command: (--post-data parameter to implement)

wget --post-data ‘user=foo&password=bar’ http://www.baidu.com

Is the method of Linux emulating Http get or post request , So that Linux systems can also send messages to a remote server.

Copyright © Windows knowledge All Rights Reserved