How can I set a cookie in a request using Fiddler?

后端 未结 7 540
深忆病人
深忆病人 2020-12-29 01:06

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

7条回答
  •  余生分开走
    2020-12-29 01:35

    To do this using the FiddlerScript engine, add the following code into the onBeforeRequest method:

    oSession.oRequest["Cookie"] = (oSession.oRequest["Cookie"] + ";YourCookieName=YourCookieValue");
    

    This will preserve any other cookies that have been set.

提交回复
热议问题