mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Add implicit string result conversion
This commit is contained in:
@@ -3,5 +3,17 @@ namespace Jackett.Common.Utils.Clients
|
||||
public class WebClientStringResult : BaseWebResult
|
||||
{
|
||||
public string ContentString { get; set; }
|
||||
|
||||
public static implicit operator WebClientStringResult(WebClientByteResult br) => new WebClientStringResult()
|
||||
{
|
||||
ContentString = br.Encoding.GetString(br.ContentBytes),
|
||||
Cookies = br.Cookies,
|
||||
Encoding = br.Encoding,
|
||||
Headers = br.Headers,
|
||||
RedirectingTo = br.RedirectingTo,
|
||||
Request = br.Request,
|
||||
Status = br.Status
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user