mirror of
https://github.com/Jackett/Jackett
synced 2025-03-10 06:03:09 +00:00
Add implicit string result conversion
This commit is contained in:
parent
4a11a770d7
commit
0f431471cd
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue