How to make http/https POST requests manually?
82,601
Solution 1
You can use wget
for this. From the manual
it supports digest authentication and can send POST requests.
There seems to be a GUI at wget::gui, but I don't know how reliable or complete it is.
Solution 2
wget may help you.
get:
wget http://example.com
post:
wget --post-data "username=Yarkee" http://example.com
Author by
neeraj
Updated on July 09, 2022Comments
-
neeraj almost 2 years
I want to test some url's on a small custom server i am working on. i have used Wfetch on windows and its awesome
My requirements for these tests are: - should be able to run on linux(ubuntu) - should be able to set all params manually - should support digest aunthentication
can someone suggest some gui or extension for such a work.
I have already tried RESTclient and Poster but they do not support digest aunthentication.
Possible duplicate of How do I manually fire HTTP POST requests with Firefox or Chrome?
-
Nathan Basanese almost 9 yearsCan this work with cookies? Many web sites are protected by either authentification forms or vicious access rules like "you must first see some introductory or advertisement pages". Such sites can't be downloaded with the well known WGET tool alone, that I know of.
-
Nathan Basanese almost 9 years// , What if the site requires a cookie or something, though?
-
Olaf Dietsche almost 9 years@NathanBasanese I haven't thought about it, but you might try
wget --load-cookies
and the following--save-cookies
option. You can also download more than just one URL, so loading some entry page and then the actual page should be doable. If it becomes more complicated, you should rather look at a web scraping framework, e.g. Scrapy. -
machineghost almost 7 yearsIt has
--load-cookies file
and--save-cookies file
options, as well as a--keep-session-cookies
option. -
N M over 6 yearsWhat about custom headers?