Class FormDataSet
- Namespace
- AngleSharp.Html
- Assembly
- AngleSharp.dll
Bundles information stored in HTML forms.
public sealed class FormDataSet : IEnumerable<string>, IEnumerable
- Inheritance
-
FormDataSet
- Implements
- Inherited Members
- Extension Methods
Constructors
FormDataSet()
Creates a new form data set with a randomly generated boundary.
public FormDataSet()
Properties
Boundary
Gets the chosen boundary.
public string Boundary { get; }
Property Value
Methods
Append(string, IFile, string)
Appends a file entry to the form data set.
public void Append(string name, IFile value, string type)
Parameters
name
stringThe name of the entry.
value
IFileThe value of the entry.
type
stringThe type of the entry.
Append(string, string, string)
Appends a text entry to the form data set.
public void Append(string name, string value, string type)
Parameters
name
stringThe name of the entry.
value
stringThe value of the entry.
type
stringThe type of the entry.
As(IFormSubmitter, Encoding?)
Applies the given submitter to serialize the form data set.
public Stream As(IFormSubmitter submitter, Encoding? encoding = null)
Parameters
submitter
IFormSubmitterThe algorithm to use.
encoding
Encoding(Optional) Explicit encoding.
Returns
- Stream
A stream containing the body.
AsJson()
Applies the application json encoding algorithm. https://darobin.github.io/formic/specs/json/#the-application-json-encoding-algorithm
public Stream AsJson()
Returns
- Stream
A stream containing the body.
AsMultipart(IHtmlEncoder, Encoding?)
Applies the multipart/form-data algorithm. http://www.w3.org/html/wg/drafts/html/master/forms.html#multipart/form-data-encoding-algorithm
public Stream AsMultipart(IHtmlEncoder htmlEncoder, Encoding? encoding = null)
Parameters
htmlEncoder
IHtmlEncoderHTML encoder.
encoding
Encoding(Optional) Explicit encoding.
Returns
- Stream
A stream containing the body.
AsPlaintext(Encoding?)
Applies the plain encoding algorithm. http://www.w3.org/html/wg/drafts/html/master/forms.html#text/plain-encoding-algorithm
public Stream AsPlaintext(Encoding? encoding = null)
Parameters
encoding
Encoding(Optional) Explicit encoding.
Returns
- Stream
A stream containing the body.
AsUrlEncoded(Encoding?)
Applies the urlencoded algorithm. http://www.w3.org/html/wg/drafts/html/master/forms.html#application/x-www-form-urlencoded-encoding-algorithm
public Stream AsUrlEncoded(Encoding? encoding = null)
Parameters
encoding
Encoding(Optional) Explicit encoding.
Returns
- Stream
A stream containing the body.
GetEnumerator()
Gets an enumerator over all entry names.
public IEnumerator<string> GetEnumerator()
Returns
- IEnumerator<string>
The enumerator.