AngleSharp by AngleSharp

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

 VirtualResponse

The virtual response class.
public static IResponse Create(Action<VirtualResponse> request)

Creates a new virtual response.

Sets the location of the response to the given url.

public VirtualResponse Address(string address)

Sets the location of the response to the provided address.

Sets the location of the response to the uri's value.

public VirtualResponse Content(string text)

Sets the response's content from the provided string.

public VirtualResponse Content(Stream stream, bool shouldDispose = false)

Sets the response's content from the provided stream.

public VirtualResponse Header(string name, string value)

Sets the header with the given name and value.

public VirtualResponse Headers(object obj)

Sets the headers with the name of the properties and their assigned values.

public VirtualResponse Headers(IDictionary<string, string> headers)

Sets the headers with the name of the keys and their assigned values.

Sets the status code.

public VirtualResponse Status(int code)

Sets the status code by providing the integer value.