mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 19:26:51 +00:00
add moondragon as an acceptable content-type
This commit is contained in:
@@ -11,6 +11,9 @@ namespace Octokit.Internal
|
||||
/// </summary>
|
||||
public class JsonHttpPipeline
|
||||
{
|
||||
private const string moondragonPreviewApiVersion = "application/vnd.github.moondragon+json; charset=utf-8";
|
||||
private const string v3ApiVersion = "application/vnd.github.v3+json; charset=utf-8";
|
||||
|
||||
readonly IJsonSerializer _serializer;
|
||||
|
||||
public JsonHttpPipeline() : this(new SimpleJsonSerializer())
|
||||
@@ -30,7 +33,8 @@ namespace Octokit.Internal
|
||||
|
||||
if (!request.Headers.ContainsKey("Accept"))
|
||||
{
|
||||
request.Headers["Accept"] = "application/vnd.github.v3+json; charset=utf-8";
|
||||
|
||||
request.Headers["Accept"] = String.Join(",", new[]{v3ApiVersion, moondragonPreviewApiVersion}) ;
|
||||
}
|
||||
|
||||
if (request.Method == HttpMethod.Get || request.Body == null) return;
|
||||
|
||||
Reference in New Issue
Block a user