C# Class CurlSharp.Curl

Top-level class for initialization and cleanup.
It also implements static methods for capabilities that don't logically belong in a class.
Mostra file Open project: WarlaxZ/Jackett Class Usage Examples

Public Methods

Method Description
Escape ( string url, int length ) : string

URL encode a String.

GetVersionInfo ( CurlVersion ver ) : CurlVersionInfoData

Get a CurlVersionInfoData object.

GlobalCleanup ( ) : void

Process-wide cleanup -- call just before exiting process.

While it's not necessary that your program call this method before exiting, doing so will prevent leaks of native cURL resources.

GlobalInit ( CurlInitFlag flags ) : CurlCode

Process-wide initialization -- call only once per process.

Unescape ( string url, int length ) : string

URL decode a String.

Private Methods

Method Description
Curl ( ) : System

Class constructor - initialize global status.

EnsureCurl ( ) : void

Called by other classes to ensure valid cURL state.

Method Details

Escape() public static method

URL encode a String.
/// Thrown if cURL isn't properly initialized. ///
public static Escape ( string url, int length ) : string
url string The string to URL encode.
length int /// Input string length; /// use 0 for cURL to determine. ///
return string

GetVersionInfo() public static method

Get a CurlVersionInfoData object.
/// Thrown if cURL isn't properly initialized. ///
public static GetVersionInfo ( CurlVersion ver ) : CurlVersionInfoData
ver CurlVersion /// Specify a , such as /// CurlVersion.Now. ///
return CurlVersionInfoData

GlobalCleanup() public static method

Process-wide cleanup -- call just before exiting process.
While it's not necessary that your program call this method before exiting, doing so will prevent leaks of native cURL resources.
public static GlobalCleanup ( ) : void
return void

GlobalInit() public static method

Process-wide initialization -- call only once per process.
public static GlobalInit ( CurlInitFlag flags ) : CurlCode
flags CurlInitFlag /// An or'd combination of /// members. ///
return CurlCode

Unescape() public static method

URL decode a String.
/// Thrown if cURL isn't properly initialized. ///
public static Unescape ( string url, int length ) : string
url string The string to URL decode.
length int /// Input string length; /// use 0 for cURL to determine. ///
return string