How can I use wget to send POST data?
85,585
Solution 1
Use the --post-data
parameter.
So your command will end with:
--post-data "[email protected]&file1=@FILE_HERE&file2=@FILE_HERE"
Solution 2
Another method is to put your data in a file. For example, if you saved a file called params.txt
as:
[email protected]
file1=@FILE_HERE
file2=@FILE_HERE
You could use --post-file params.txt
Related videos on Youtube
Author by
Ashish
Updated on September 18, 2022Comments
-
Ashish over 1 year
I want to make following POST request to my server using wget:
[email protected]&file1=@FILE_HERE&file2=@FILE_HERE
In the above request, there are three POST parameters called
email
,file1
andfile2
whereemail
contains email of user andfile1
,file2
contain a file.How can I send it using
wget
? I don't want to usecurl
.