Wget and curl to post data

i'm using this command to post data to a remote host:

wget --post-data="My Data" http://<my-ip>:80 -O /dev/null -q

and

curl --data "My Data" http://<my-ip>:80

however, when i run the above, i see the following in my access log on the remote host:

Wget:

10.10.10.10 - - [12/Oct/2016:19:38:34 +0000] "POST / HTTP/1.0" 200 1085 "-" "Wget/1.11.4 Red Hat modified"

Curl:

10.10.10.10 - - [12/Oct/2016:19:45:53 +0000] "POST / HTTP/1.1" 200 1106 "-" "curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"

how can i change the data that is bolded? I want "My Data" to appear where the bolded is.

i'd like to do this with both wget and curl.

is this possible?

You can't. The log is showing how you connected (HTTP 1.1) and what you did (POST), not the data you sent.

1 Like