Skip to content

Commit

Permalink
HACK: what if i kill off some warnings to find the actual reason?
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftkey committed Jul 19, 2015
1 parent 3b21502 commit 957e4b7
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Octokit/Clients/IRepositoryContentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,21 @@ public interface IRepositoryContentsClient
Task DeleteFile(string owner, string name, string path, DeleteFileRequest request);
}

/// <summary>
/// Supported archive formats for use when downloading repository snapshots
/// </summary>
public enum ArchiveFormat
{
/// <summary>
/// A tar archive
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Tarball")]
[Parameter(Value = "tarball")]
Tarball,

/// <summary>
/// A zip archive
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Zipball")]
[Parameter(Value = "zipball")]
Zipball
Expand Down
35 changes: 35 additions & 0 deletions Octokit/Http/IRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,51 @@

namespace Octokit.Internal
{
/// <summary>
/// Abstraction for creating HTTP requests
/// </summary>
public interface IRequest
{
/// <summary>
/// The request payload to send
/// </summary>
object Body { get; set; }

/// <summary>
/// Headers to send with the request
/// </summary>
Dictionary<string, string> Headers { get; }

/// <summary>
/// The method to perform as part of the request
/// </summary>
HttpMethod Method { get; }

/// <summary>
/// Additional parameters to use in the query string
/// </summary>
Dictionary<string, string> Parameters { get; }

/// <summary>
/// The base address for the request
/// </summary>
Uri BaseAddress { get; }

/// <summary>
/// The resource to query as part of the request
/// </summary>
Uri Endpoint { get; }

/// <summary>
/// Expire the request after a given time span
/// </summary>
TimeSpan Timeout { get; }

/// <summary>
/// The type of content being sent with the request
/// </summary>
string ContentType { get; }

[Obsolete("This value is no longer respected due to the necessary redirect work")]
bool AllowAutoRedirect { get; }
}
Expand Down
34 changes: 34 additions & 0 deletions Octokit/Http/Request.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace Octokit.Internal
{
/// <summary>
/// Abstraction for creating HTTP requests
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces")]
public class Request : IRequest
{
Expand All @@ -14,13 +17,44 @@ public Request()
Timeout = TimeSpan.FromSeconds(100);
}

/// <summary>
/// The request payload to send
/// </summary>
public object Body { get; set; }

/// <summary>
/// Headers to send with the request
/// </summary>
public Dictionary<string, string> Headers { get; private set; }

/// <summary>
/// The method to perform as part of the request
/// </summary>
public HttpMethod Method { get; set; }

/// <summary>
/// Additional parameters to use in the query string
/// </summary>
public Dictionary<string, string> Parameters { get; private set; }

/// <summary>
/// The base address for the request
/// </summary>
public Uri BaseAddress { get; set; }

/// <summary>
/// The resource to query as part of the request
/// </summary>
public Uri Endpoint { get; set; }

/// <summary>
/// Expire the request after a given time span
/// </summary>
public TimeSpan Timeout { get; set; }

/// <summary>
/// The type of content being sent with the request
/// </summary>
public string ContentType { get; set; }

[Obsolete("This value is no longer respected due to the necessary redirect work")]
Expand Down

0 comments on commit 957e4b7

Please sign in to comment.