36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
using System;
|
|
using System.IO;
|
|
using ln.http.content;
|
|
|
|
namespace ln.http.client
|
|
{
|
|
public class HttpClientResponse
|
|
{
|
|
public HttpMethod Method { get; }
|
|
public Uri Uri { get; }
|
|
|
|
public HttpStatusCode StatusCode { get; }
|
|
public string Reason { get; }
|
|
|
|
private HeaderContainer _responseHeaders;
|
|
private Stream _contentStream;
|
|
|
|
public HeaderContainer Headers => _responseHeaders;
|
|
public Stream ContentStream => _contentStream;
|
|
|
|
public HttpClientResponse(HttpMethod method, Uri uri, HttpStatusCode statusCode, string reason, HeaderContainer responseHeaders, Stream contentStream)
|
|
{
|
|
Method = method;
|
|
Uri = uri;
|
|
|
|
StatusCode = statusCode;
|
|
Reason = reason;
|
|
|
|
_responseHeaders = responseHeaders;
|
|
_contentStream = contentStream;
|
|
}
|
|
|
|
public override string ToString() => String.Format("{0} {1}", (int)StatusCode, StatusCode);
|
|
}
|
|
}
|