Improve accepts and content type handling

This commit is contained in:
Haacked
2013-10-06 22:21:58 -07:00
parent 9f1626e484
commit f8e7d2da29
5 changed files with 49 additions and 30 deletions
+6 -6
View File
@@ -88,7 +88,7 @@ namespace Octokit.Http
public async Task Delete(Uri endpoint)
{
Ensure.ArgumentNotNull(endpoint, "endpoint");
await Connection.DeleteAsync<T>(endpoint);
}
@@ -98,11 +98,11 @@ namespace Octokit.Http
Ensure.ArgumentNotNull(rawData, "rawData");
Ensure.ArgumentNotNull(contentType, "contentType");
var response = await Connection.PostRawAsync<TOther>(uri, rawData, new Dictionary<string, string>
{
{ "Content-Type", contentType },
{ "Accept", "application/vnd.github.manifold-preview" }
});
var response = await Connection.PostAsync<TOther>(
uri,
rawData,
contentType,
"application/vnd.github.manifold-preview");
return response.BodyAsObject;
}