Class FiddlerApplication
This class acts as the central point for script/extensions to interact with Fiddler components.
Inheritance
Inherited Members
Namespace: Fiddler
Assembly: FiddlerCore.dll
Syntax
public static class FiddlerApplication
Fields
ClientCertificateProvider
Declaration
public static LocalCertificateSelectionCallback ClientCertificateProvider
Field Value
System.Net.Security.LocalCertificateSelectionCallback
|
isClosing
TRUE if Fiddler is currently shutting down. Suspend all work that won't have side-effects.
Declaration
public static bool isClosing
Field Value
System.Boolean
|
oDefaultClientCertificate
The default certificate used for client authentication
Declaration
public static X509Certificate oDefaultClientCertificate
Field Value
System.Security.Cryptography.X509Certificates.X509Certificate
|
oProxy
Fiddler's core proxy object.
Declaration
[CodeDescription("Fiddler's core proxy engine.")]
public static Proxy oProxy
Field Value
Proxy
|
oTranscoders
Fiddler Import/Export Transcoders
Declaration
public static FiddlerTranscoders oTranscoders
Field Value
FiddlerTranscoders
|
Properties
CustomMimeMappings
By setting this property you can provide Telerik Fiddler Core with custom MIME-type-to-file-extension mappings.
Declaration
public static IEnumerable<MimeMap> CustomMimeMappings { set; }
Property Value
System.Collections.Generic.IEnumerable<MimeMap>
|
Log
Fiddler's logging system
Declaration
[CodeDescription("Fiddler's logging subsystem; displayed on the LOG tab by default.")]
public static Logger Log { get; }
Property Value
Logger
|
oSAZProvider
Prefs
Fiddler's Preferences collection. Learn more at http://fiddler.wikidot.com/prefs
Declaration
[CodeDescription("Fiddler's Preferences collection. http://fiddler.wikidot.com/prefs")]
public static IFiddlerPreferences Prefs { get; }
Property Value
IFiddlerPreferences
|
Methods
add_AfterSessionComplete(SessionStateHandler)
Declaration
public static void add_AfterSessionComplete(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
add_BeforeRequest(SessionStateHandler)
Declaration
public static void add_BeforeRequest(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
add_BeforeResponse(SessionStateHandler)
Declaration
public static void add_BeforeResponse(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
add_BeforeReturningError(SessionStateHandler)
Declaration
public static void add_BeforeReturningError(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
add_FiddlerAttach(SimpleEventHandler)
Declaration
public static void add_FiddlerAttach(SimpleEventHandler value)
Parameters
SimpleEventHandler
value
|
add_FiddlerDetach(SimpleEventHandler)
Declaration
public static void add_FiddlerDetach(SimpleEventHandler value)
Parameters
SimpleEventHandler
value
|
add_RequestHeadersAvailable(SessionStateHandler)
Declaration
public static void add_RequestHeadersAvailable(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
add_ResponseHeadersAvailable(SessionStateHandler)
Declaration
public static void add_ResponseHeadersAvailable(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
CreateProxyEndpoint(Int32, Boolean, X509Certificate2)
Start a new proxy endpoint instance, listening on the specified port
Declaration
public static Proxy CreateProxyEndpoint(int iPort, bool bAllowRemote, X509Certificate2 certHTTPS)
Parameters
System.Int32
iPort
The port to listen on |
System.Boolean
bAllowRemote
TRUE if remote clients should be permitted to connect to this endpoint |
System.Security.Cryptography.X509Certificates.X509Certificate2
certHTTPS
A certificate to return when clients connect, or null |
Returns
Proxy
A Proxy object, or null if unsuccessful |
CreateProxyEndpoint(Int32, Boolean, String)
Start a new proxy endpoint instance, listening on the specified port
Declaration
public static Proxy CreateProxyEndpoint(int iPort, bool bAllowRemote, string sHTTPSHostname)
Parameters
System.Int32
iPort
The port to listen on |
System.Boolean
bAllowRemote
TRUE if remote clients should be permitted to connect to this endpoint |
System.String
sHTTPSHostname
A Hostname (e.g. EXAMPLE.com) if this endpoint should be treated as a HTTPS Server |
Returns
Proxy
A Proxy object, or null if unsuccessful |
DoExport(String, Session[], Dictionary<String, Object>, EventHandler<ProgressCallbackEventArgs>)
Export Sessions in the specified format
Declaration
public static bool DoExport(string sExportFormat, Session[] oSessions, Dictionary<string, object> dictOptions, EventHandler<ProgressCallbackEventArgs> ehPCEA)
Parameters
System.String
sExportFormat
Shortname of desired format |
Session[]
oSessions
Sessions to export |
System.Collections.Generic.Dictionary<System.String, System.Object>
dictOptions
Options to pass to the ISessionExport interface |
System.EventHandler<ProgressCallbackEventArgs>
ehPCEA
Your callback event handler, or NULL to allow Fiddler to handle |
Returns
System.Boolean
TRUE if successful, FALSE if desired format doesn't exist or other error occurs |
DoImport(String, Boolean, Dictionary<String, Object>, EventHandler<ProgressCallbackEventArgs>, GetPasswordDelegate)
Calls a Fiddler Session Importer and returns the list of loaded Sessions.
Declaration
public static Session[] DoImport(string sImportFormat, bool bAddToSessionList, Dictionary<string, object> dictOptions, EventHandler<ProgressCallbackEventArgs> ehPCEA, GetPasswordDelegate passwordCallback = null)
Parameters
System.String
sImportFormat
String naming the Import format, e.g. HTTPArchive |
System.Boolean
bAddToSessionList
Should sessions be added to WebSessions list? (Not meaningful for FiddlerCore) |
System.Collections.Generic.Dictionary<System.String, System.Object>
dictOptions
Dictionary of Options to pass to the Transcoder |
System.EventHandler<ProgressCallbackEventArgs>
ehPCEA
Your callback event handler, or NULL to allow Fiddler to handle |
GetPasswordDelegate
passwordCallback
Callback that is used to request passwords from the host if needed |
Returns
Session[]
Loaded Session[], or null on Failure |
GetVersionString()
Gets Fiddler* version info
Declaration
public static string GetVersionString()
Returns
System.String
A string indicating the build/flavor of the Fiddler* assembly |
IsStarted()
Checks if FiddlerCore is running.
Declaration
public static bool IsStarted()
Returns
System.Boolean
TRUE if FiddlerCore is started/listening; FALSE otherwise. |
IsSystemProxy()
Checks if FiddlerCore is running and registered as the System Proxy.
Declaration
public static bool IsSystemProxy()
Returns
System.Boolean
TRUE if FiddlerCore IsStarted AND registered as the system proxy; FALSE otherwise. |
LogLeakedFile(String)
Record that a temporary file was created and handed to an external tool. We'll do our best to delete this file on exit.
Declaration
public static void LogLeakedFile(string sTempFile)
Parameters
System.String
sTempFile
The filename of the file to be deleted |
remove_AfterSessionComplete(SessionStateHandler)
Declaration
public static void remove_AfterSessionComplete(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
remove_BeforeRequest(SessionStateHandler)
Declaration
public static void remove_BeforeRequest(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
remove_BeforeResponse(SessionStateHandler)
Declaration
public static void remove_BeforeResponse(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
remove_BeforeReturningError(SessionStateHandler)
Declaration
public static void remove_BeforeReturningError(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
remove_FiddlerAttach(SimpleEventHandler)
Declaration
public static void remove_FiddlerAttach(SimpleEventHandler value)
Parameters
SimpleEventHandler
value
|
remove_FiddlerDetach(SimpleEventHandler)
Declaration
public static void remove_FiddlerDetach(SimpleEventHandler value)
Parameters
SimpleEventHandler
value
|
remove_RequestHeadersAvailable(SessionStateHandler)
Declaration
public static void remove_RequestHeadersAvailable(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
remove_ResponseHeadersAvailable(SessionStateHandler)
Declaration
public static void remove_ResponseHeadersAvailable(SessionStateHandler value)
Parameters
SessionStateHandler
value
|
ResetSessionCounter()
Reset the SessionID counter to 0. This method can lead to confusing UI, so call sparingly.
Declaration
[CodeDescription("Reset the SessionID counter to 0. This method can lead to confusing UI, so call sparingly.")]
public static void ResetSessionCounter()
SetAppDisplayName(String)
Set the DisplayName for the application
Declaration
public static void SetAppDisplayName(string sAppName)
Parameters
System.String
sAppName
1 to 64 character name to be displayed in error messages, etc |
Shutdown()
Shuts down the FiddlerCore proxy and disposes it. Note: If there's any traffic in progress while you're calling this method, your background threads are likely to blow up with ObjectDisposedExceptions or NullReferenceExceptions. In many cases, you're better off simply calling oProxy.Detach() and letting the garbage collector clean up when your program exits.
Declaration
public static void Shutdown()
Startup(FiddlerCoreStartupSettings)
Recommended way to Start FiddlerCore.
Declaration
public static void Startup(FiddlerCoreStartupSettings startupSettings)
Parameters
FiddlerCoreStartupSettings startupSettings |
Supports(String)
Does this Fiddler instance support the specified feature?
Declaration
public static bool Supports(string sFeatureName)
Parameters
System.String
sFeatureName
Feature name (e.g. "bzip2") |
Returns
System.Boolean
TRUE if the specified feature is supported; false otherwise |
Events
AfterSessionComplete
This event fires when a session has been completed
Declaration
public static event SessionStateHandler AfterSessionComplete
Event Type
SessionStateHandler
|
AfterSocketAccept
Fired each time Fiddler successfully accepts a TCP/IP connection
Declaration
public static event EventHandler<ConnectionEventArgs> AfterSocketAccept
Event Type
System.EventHandler<ConnectionEventArgs>
|
AfterSocketConnect
Fired each time Fiddler successfully establishes a TCP/IP connection
Declaration
public static event EventHandler<ConnectionEventArgs> AfterSocketConnect
Event Type
System.EventHandler<ConnectionEventArgs>
|
BeforeRequest
This event fires when a client request is received by Fiddler
Declaration
public static event SessionStateHandler BeforeRequest
Event Type
SessionStateHandler
|
BeforeResponse
This event fires when a server response is received by Fiddler
Declaration
public static event SessionStateHandler BeforeResponse
Event Type
SessionStateHandler
|
BeforeReturningError
This event fires when an error response is generated by Fiddler
Declaration
public static event SessionStateHandler BeforeReturningError
Event Type
SessionStateHandler
|
FiddlerAttach
Sync this event to be notified when FiddlerCore has attached as the system proxy.")]
Declaration
[CodeDescription("Sync this event to be notified when FiddlerCore has attached as the system proxy.")]
public static event SimpleEventHandler FiddlerAttach
Event Type
SimpleEventHandler
|
FiddlerDetach
Sync this event to be notified when FiddlerCore has detached as the system proxy.
Declaration
[CodeDescription("Sync this event to be notified when FiddlerCore has detached as the system proxy.")]
public static event SimpleEventHandler FiddlerDetach
Event Type
SimpleEventHandler
|
OnClearCache
This event fires when the user instructs Fiddler to clear the cache or cookies
Declaration
[CodeDescription("This event fires when the user instructs Fiddler to clear the cache or cookies.")]
public static event EventHandler<CacheClearEventArgs> OnClearCache
Event Type
System.EventHandler<CacheClearEventArgs>
|
OnReadRequestBuffer
This event fires each time FiddlerCore reads data from network for the client's request. Note that this data is not formatted in any way, and must be parsed by the recipient.
Declaration
public static event EventHandler<RawReadEventArgs> OnReadRequestBuffer
Event Type
System.EventHandler<RawReadEventArgs>
|
OnReadResponseBuffer
This event fires each time FiddlerCore reads data from network for the server's response. Note that this data is not formatted in any way, and must be parsed by the recipient.
Declaration
public static event EventHandler<RawReadEventArgs> OnReadResponseBuffer
Event Type
System.EventHandler<RawReadEventArgs>
|
OnValidateServerCertificate
This event fires when Fiddler evaluates the validity of a server-provided certificate. Adjust the value of the ValidityState property if desired.
Declaration
[CodeDescription("This event fires a HTTPS certificate is validated.")]
public static event EventHandler<ValidateServerCertificateEventArgs> OnValidateServerCertificate
Event Type
System.EventHandler<ValidateServerCertificateEventArgs>
|
OnWebSocketMessage
This event fires when Fiddler captures a WebSocket message
Declaration
public static event EventHandler<WebSocketMessageEventArgs> OnWebSocketMessage
Event Type
System.EventHandler<WebSocketMessageEventArgs>
|
RequestHeadersAvailable
This event fires when Request Headers are available
Declaration
public static event SessionStateHandler RequestHeadersAvailable
Event Type
SessionStateHandler
|
ResponseHeadersAvailable
This event fires when Response Headers are available
Declaration
public static event SessionStateHandler ResponseHeadersAvailable
Event Type
SessionStateHandler
|