Wget and curl to post data


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 10-12-2016
Wget and curl to post data

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

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

and

Code:
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:
Code:
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:
Code:
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?
# 2  
Old 10-12-2016
You can't. The log is showing how you connected (HTTP 1.1) and what you did (POST), not the data you sent.
This User Gave Thanks to Corona688 For This Post:
SkySmart (10-12-2016)
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
How to post content file of data using curl? fajar_3t3 Shell Programming and Scripting 0 03-19-2018 01:33 AM
How to get content of a webpage Curl vs Wget? baris35 Shell Programming and Scripting 1 12-27-2015 08:52 PM
Need help in wget or curl command in UNIX shell zen01234 Shell Programming and Scripting 1 09-28-2015 03:52 PM
Data Post with curl iddfcr Web Development 1 11-17-2014 11:34 AM
Curl Script - Post a file (multipart/form-data) Anooja G Shell Programming and Scripting 0 04-28-2014 09:08 AM
Read URL data from UNIX-CLI without Wget,CURL,w3m,LWP scott_cog Shell Programming and Scripting 12 10-09-2013 08:30 AM
Read URL data from UNIX without wget,curl,lynx,w3m. scott_cog UNIX for Dummies Questions & Answers 0 10-05-2013 01:24 PM
Wget/curl credentials validation sathyaonnuix Shell Programming and Scripting 2 01-17-2013 02:55 AM
Wget vs Curl - Proxy issue sathyaonnuix Shell Programming and Scripting 2 12-13-2012 01:18 AM
Encapsulating output of CURL and/or WGET SkySmart Shell Programming and Scripting 3 09-27-2012 07:20 PM
How to download file without curl and wget rubber08 Shell Programming and Scripting 1 04-21-2012 09:59 AM
Specifying IP address with curl/wget colinireland Shell Programming and Scripting 4 11-28-2011 07:36 AM
Proxy with curl/wget support locoroco Shell Programming and Scripting 1 03-07-2011 05:29 PM
Help with using lynx/wget/curl when a link has an ampersand seagaia Shell Programming and Scripting 3 01-31-2011 11:41 AM
Help needed in Curl & Wget dineshbabu01 Shell Programming and Scripting 0 05-14-2010 01:08 AM