mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 04:40:54 +00:00
Make IResponse.ContentType readonly
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit.Internal
|
||||
@@ -19,10 +21,21 @@ namespace Octokit.Internal
|
||||
ApiInfo = ApiInfoParser.ParseResponseHeaders(headers);
|
||||
}
|
||||
|
||||
public Response(HttpStatusCode statusCode, object body, IDictionary<string, string> headers, string contentType)
|
||||
{
|
||||
Ensure.ArgumentNotNull(headers, "headers");
|
||||
|
||||
StatusCode = statusCode;
|
||||
Body = body;
|
||||
Headers = headers;
|
||||
ApiInfo = ApiInfoParser.ParseResponseHeaders(headers);
|
||||
ContentType = contentType;
|
||||
}
|
||||
|
||||
public object Body { get; set; }
|
||||
public IDictionary<string, string> Headers { get; private set; }
|
||||
public ApiInfo ApiInfo { get; private set; }
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
public string ContentType { get; set; }
|
||||
public string ContentType { get; private set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user