views:

30

answers:

2

I need to set a cookie before I issue a request to a Web site using Fiddler. How do I do this?

A: 

Fiddler allows your to resend/rebuild an existing request. There is a Request Builder. While rebuilding in the RAW form, modify your cookies.

Ankit Jain
That's fine for existing requests - but this is a new request that requires a cookie.
Jeremy McGee
+1  A: 

You need to be more specific about what you're trying to do.

You can edit (or add) an outbound Cookie header to send a cookie to the website. You can do this either manually or via the FiddlerScript engine. But that doesn't "set" the cookie on the client-- it simply sends it to the server. If you want to set a cookie on the client, you either have to use another means, or you can inject a Set-Cookie response header on a previous response from the server, with the value you want to set on the client.

EricLaw -MSFT-
Thanks Eric, setting the outbound cookie header is precisely what I want to do. (BTW Fiddler is a most excellent tool, I'm working in a team of about 250 developers, each of which use it pretty much every day. We find it just the ticket for diagnosing low-level issues with REST services.)
Jeremy McGee