C# Класс 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.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

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

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

Метод Описание
Dispose ( bool disposing ) : void
GetHandle ( ) : IntPtr

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

AddSection() публичный Метод

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

CurlHttpMultiPartForm() публичный Метод

Constructor
/// This is thrown /// if hasn't bee properly initialized. ///
public CurlHttpMultiPartForm ( ) : System
Результат System

Dispose() публичный Метод

Free unmanaged resources.
public Dispose ( ) : void
Результат void