C# Class CurlSharp.CurlHttpMultiPartForm

Wraps a section of multipart form data to be submitted via the CurlOption.HttpPost option in the CurlEasy.SetOpt member of the CurlEasy class.
Inheritance: IDisposable
Afficher le fichier Open project: WarlaxZ/Jackett Class Usage Examples

Méthodes publiques

Méthode Description
AddSection ( ) : CurlFormCode

Add a multi-part form section.

This is definitely the workhorse method for this class. It should be called in roughly the same manner as curl_formadd(), except you would omit the first two struct curl_httppost** arguments (firstitem and lastitem), which are wrapped in this class. So you should pass arguments in the following sequence:

CurlHttpMultiPartForm.AddSection(option1, value1, ..., optionX, valueX, CurlFormOption.End) ;

For a complete list of possible options, see the documentation for the CurlFormOption enumeration.

The pointer options (PtrName, etc.) make an internal copy of the passed byte array. Therefore, any changes you make to the client copy of this array AFTER calling this method, won't be reflected internally with cURL. The purpose of providing the pointer options is to support the posting of non-string binary data.
CurlHttpMultiPartForm ( ) : System

Constructor

Dispose ( ) : void

Free unmanaged resources.

Private Methods

Méthode Description
Dispose ( bool disposing ) : void
GetHandle ( ) : IntPtr

Method Details

AddSection() public méthode

Add a multi-part form section.
This is definitely the workhorse method for this class. It should be called in roughly the same manner as curl_formadd(), except you would omit the first two struct curl_httppost** arguments (firstitem and lastitem), which are wrapped in this class. So you should pass arguments in the following sequence:

CurlHttpMultiPartForm.AddSection(option1, value1, ..., optionX, valueX, CurlFormOption.End) ;

For a complete list of possible options, see the documentation for the CurlFormOption enumeration.

The pointer options (PtrName, etc.) make an internal copy of the passed byte array. Therefore, any changes you make to the client copy of this array AFTER calling this method, won't be reflected internally with cURL. The purpose of providing the pointer options is to support the posting of non-string binary data.
public AddSection ( ) : CurlFormCode
Résultat CurlFormCode

CurlHttpMultiPartForm() public méthode

Constructor
/// This is thrown /// if hasn't bee properly initialized. ///
public CurlHttpMultiPartForm ( ) : System
Résultat System

Dispose() public méthode

Free unmanaged resources.
public Dispose ( ) : void
Résultat void