Post

Using Wget

How to perform requests using wget and setup a http proxy for wget.

API Call

1
wget https://testing.com/login

Ignore Cert Issues

1
--no-check-certificate

Add Headers

1
--header 'Authorization: Basic TOKEN_HERE'

Add Body

1
--post-data 'username=admin&password=admin'

All Together

1
wget --no-check-certificate --header 'Authorization: Basic TOKEN_HERE' --post-data 'username=admin&password=admin' https://testing.com/login


HTTP(S) Proxy

Open /etc/wgetrc as root:

1
sudo nano /etc/wgetrc

Add/uncomment the following lines:

1
2
https_proxy = http://127.0.0.1:8080/
http_proxy = http://127.0.0.1:8080/


This post is licensed under CC BY 4.0 by the author.