19 lines
416 B
C#
19 lines
416 B
C#
namespace MiniHTTP.Responses;
|
|
|
|
/// <summary>
|
|
/// A response redirecting the request to another location.
|
|
/// </summary>
|
|
public class Redirect : HttpResponse
|
|
{
|
|
public string Location;
|
|
|
|
public Redirect(string location) : base(301, "Redirect")
|
|
{
|
|
Location = location;
|
|
}
|
|
|
|
public override IEnumerable<(string, string)> GetHeaders()
|
|
{
|
|
yield return ("Location", Location);
|
|
}
|
|
}
|