Quantcast
Channel: Questions in topic: "httpwebrequest"
Viewing all articles
Browse latest Browse all 190

How to change Host name in HttpWebRequest headers in unity .net 2.0?

$
0
0
I want to call a webpage by its ip address by adding custom values to request header for "host". "
" Code: HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://1.1.1.1"); request.Headers["Host"] = "xyz.net"; WebResponse response = request.GetResponse(); But it gives an error: **ArgumentException: restricted header** it seems that some headers cannot be modified in .net 2.0 so is there any way that i can change the host or change the .net version in unity to higher version?

Viewing all articles
Browse latest Browse all 190

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>