1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-16 02:43:00 +00:00

Changed web request results to WebCallResult to support response status code

This commit is contained in:
Jan Korf
2019-02-27 10:59:31 +01:00
parent 16b5685606
commit 094369e255
6 changed files with 51 additions and 18 deletions
+16 -1
View File
@@ -1,4 +1,6 @@
namespace CryptoExchange.Net.Objects
using System.Net;
namespace CryptoExchange.Net.Objects
{
public class CallResult<T>
{
@@ -21,4 +23,17 @@
Error = error;
}
}
public class WebCallResult<T>: CallResult<T>
{
/// <summary>
/// The status code of the response. Note that a OK status does not always indicate success, check the Success parameter for this.
/// </summary>
public HttpStatusCode? ResponseStatusCode { get; set; }
public WebCallResult(HttpStatusCode? code, T data, Error error): base(data, error)
{
ResponseStatusCode = code;
}
}
}