winforms - Open a web browser using C# win application and add request headers in the request -


i have situation want simulate web request comes application. contains url values , request headers.

i know can start browser using

var url = "http://test.com"; var sinfo = new processstartinfo(url); process.start(sinfo); 

but want add header values in url want open in browser. have tried using different things not able open in browser.

i have used webclient below

webclient client = new webclient(); var url = "http://test.com"; client.headers.add("user", "abc"); string text=client.downloadstring(url); 

but how use string in web browser don't know.

i have tried webbrowser not able simulate.

there no standard this. if want pass custom headers, need consult web browser using. don't think of major browsers have such feature, though - however, there extensions both chrome , firefox allow globally add headers every request. maybe that's enough you, maybe not.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -