Radarr/src/NzbDrone.Common/Http/HttpAccept.cs

27 lines
855 B
C#
Raw Normal View History

2016-12-23 21:45:24 +00:00
namespace NzbDrone.Common.Http
{
public sealed class HttpAccept
{
public static readonly HttpAccept Rss = new HttpAccept("application/rss+xml, text/rss+xml, application/xml, text/xml");
public static readonly HttpAccept Json = new HttpAccept("application/json");
2019-12-05 21:41:55 +00:00
#if NETCOREAPP
public static readonly HttpAccept JsonCharset = new HttpAccept("application/json; charset=utf-8");
#else
public static readonly HttpAccept JsonCharset = new HttpAccept("application/json;charset=utf-8");
#endif
public static readonly HttpAccept Html = new HttpAccept("text/html");
public string Value { get; private set; }
public HttpAccept(string accept)
{
Value = accept;
}
public override string ToString()
{
return Value;
}
}
}