AngleSharp by Florian Rappl

<PackageReference Include="AngleSharp" Version="0.8.8" />

 DocumentRequest

public class DocumentRequest
Represents the arguments to load a document.
public Stream Body { get; set; }

Gets or sets the stream of the request's body.

public HttpMethod Method { get; set; }

Gets or sets the method to use.

public string MimeType { get; set; }

Gets or sets the mime-type to use, if any.

public string Referer { get; set; }

Gets or sets the referrer of the request, if any. The name is intentionally spelled wrong, to emphasize the relationship with the HTTP header.

public INode Source { get; set; }

Gets or sets the source of the request, if any.

public Url Target { get; }

Gets the target of the request.

public DocumentRequest(Url target)

Creates a new document request for the given url.

public static DocumentRequest Get(Url target, INode source = null, string referer = null)

Creates a GET request for the given target from the optional source node and optional referer string.

public static DocumentRequest Post(Url target, Stream body, string type, INode source = null, string referer = null)

Creates a POST request for the given target with the provided body and encoding type from the optional source node and optional referer string.

public static DocumentRequest PostAsPlaintext(Url target, IDictionary<string, string> fields)

Creates a POST request for the given target with the fields being used to generate the body and encoding type plaintext.

public static DocumentRequest PostAsUrlencoded(Url target, IDictionary<string, string> fields)

Creates a POST request for the given target with the fields being used to generate the body and encoding type url encoded.