Headers, How to add headers
- Run fiddler
- Use the editor
- Find the method: static function OnBeforeRequest(oSession: Session) {
- At the end of it add your handler code.
- Save the changes and try it (seems like fiddler picks up the changes when you save)
- See the sample here:
if (oSession.fullUrl.Contains("/somepartOfUrlToMatch"))
{
FiddlerObject.alert('show alert');
oSession.oRequest["X-MY-USER"]="someUsername";
oSession.oRequest["X-MY-ROLE"]="someRole";
}
Installing it:
- Get it from telrick http://www.telerik.com/fiddler
- Install it.
- Run it
- Try to "Rules -> Customize Rules" and then have it download the editor for you (or if you are a masochist edit in the default editor)
- Install the editor
- Use the editor to adjust the rules (it seems to automatically know where the file is and to automatically load it)
Popup, How to show a debug popup:
FiddlerObject.alert('show this message');
No comments:
Post a Comment