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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user