mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-10-27 16:37:24 +00:00
Added LibraryHelpers.CreateHttpClientMessageHandle to standardize HttpMessageHandler creation Added REST client option for selecting HTTP protocol version Added REST client option for HTTP client keep alive interval Added HttpVersion to WebCallResult responses Updated request logic to default to using HTTP version 2.0 for dotnet core
51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Net;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CryptoExchange.Net.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Response object interface
|
|
/// </summary>
|
|
public interface IResponse
|
|
{
|
|
/// <summary>
|
|
/// The response status code
|
|
/// </summary>
|
|
HttpStatusCode StatusCode { get; }
|
|
|
|
/// <summary>
|
|
/// Http protocol version
|
|
/// </summary>
|
|
Version HttpVersion { get; }
|
|
|
|
/// <summary>
|
|
/// Whether the status code indicates a success status
|
|
/// </summary>
|
|
bool IsSuccessStatusCode { get; }
|
|
|
|
/// <summary>
|
|
/// The length of the response in bytes
|
|
/// </summary>
|
|
long? ContentLength { get; }
|
|
|
|
/// <summary>
|
|
/// The response headers
|
|
/// </summary>
|
|
KeyValuePair<string, string[]>[] ResponseHeaders { get; }
|
|
|
|
/// <summary>
|
|
/// Get the response stream
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
Task<Stream> GetResponseStreamAsync();
|
|
|
|
/// <summary>
|
|
/// Close the response
|
|
/// </summary>
|
|
void Close();
|
|
}
|
|
}
|