C# Класс CurlSharp.Curl

Top-level class for initialization and cleanup.
It also implements static methods for capabilities that don't logically belong in a class.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
Curl ( ) : System

Class constructor - initialize global status.

EnsureCurl ( ) : void

Called by other classes to ensure valid cURL state.

Описание методов

Escape() публичный статический Метод

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. ///
Результат string

GetVersionInfo() публичный статический Метод

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. ///
Результат CurlVersionInfoData

GlobalCleanup() публичный статический Метод

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
Результат void

GlobalInit() публичный статический Метод

Process-wide initialization -- call only once per process.
public static GlobalInit ( CurlInitFlag flags ) : CurlCode
flags CurlInitFlag /// An or'd combination of /// members. ///
Результат CurlCode

Unescape() публичный статический Метод

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. ///
Результат string