I can use both HttpWebRequest
to send an HTTP request and get an HTTP response without a WebClient
.
When should you use HttpWebRequest
and when should you use WebClient
?
WebClient can be used when you don't need any fine-tuning.
When using HttpWebRequest, you can control various options, including timeouts (very important). So basically - WebClient for toy projects / POCs, HttpWebRequest for actual business.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With