2016-12-23 21:45:24 +00:00
|
|
|
|
namespace NzbDrone.Common.Http
|
2014-09-07 11:44:24 +00:00
|
|
|
|
{
|
|
|
|
|
public sealed class HttpAccept
|
|
|
|
|
{
|
2016-05-10 22:18:27 +00:00
|
|
|
|
public static readonly HttpAccept Rss = new HttpAccept("application/rss+xml, text/rss+xml, application/xml, text/xml");
|
2014-09-07 11:44:24 +00:00
|
|
|
|
public static readonly HttpAccept Json = new HttpAccept("application/json");
|
2019-10-14 21:42:30 +00:00
|
|
|
|
public static readonly HttpAccept JsonCharset = new HttpAccept("application/json; charset=utf-8");
|
2014-09-07 11:44:24 +00:00
|
|
|
|
public static readonly HttpAccept Html = new HttpAccept("text/html");
|
2019-12-22 21:24:11 +00:00
|
|
|
|
|
2015-10-03 17:45:26 +00:00
|
|
|
|
public string Value { get; private set; }
|
2014-09-07 11:44:24 +00:00
|
|
|
|
|
2015-10-03 17:45:26 +00:00
|
|
|
|
public HttpAccept(string accept)
|
2014-09-07 11:44:24 +00:00
|
|
|
|
{
|
|
|
|
|
Value = accept;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return Value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|