c# - How to add query string to httpwebrequest -


i want add querystrings httpwebrequest, cannot find property? remembered there querystring dictionary can use before.

the best way add query string follows:

var targeturi = new uri("http://www.example.org?querystring=a&b=c"); var webrequest = (httpwebrequest)webrequest.create(targeturi);  var webrequestresponse = webrequest.getresponse(); 

remember: if you're using user input construct uri, ensure validate it, escape , don't trust it.


Comments

Popular posts from this blog

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -