Saturday, February 18, 2006

NUnitAsp Browser Headers?

For many online applications it is necessary to set headers in the client. Has anyone figured out how to do this with the NUnitAsp Browser?

Looks like the HttpClient class has only private methods for getting at the Request (which is where the headers are). Unfortunately many corporations need standard test harnesses so it isn't an option for me to just rewrite NUnitASP.


Jonathan Cogley said...

We (thycotic) have managed to set the cookies that NUnitAsp sends. We did this to preserve an ASP.NET form authenticated session across requests. While this wouldn't use the Headers collection directly, it is obviously changing the HTTP headers that are sent and might be useful.

David Patton said...

There are a lot of times when users are coming to the site from other sites. Some single-signon mechanisms put the authentication information in the headers. Probably it is done to use with browsers that don't enable cookies and also to all the session management headaches.