Skip to content

Commit

Permalink
Added more overrides for PutFile
Browse files Browse the repository at this point in the history
  • Loading branch information
skazantsev committed Jun 8, 2018
1 parent e8a6619 commit f162767
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/WebDav.Client/IWebDavClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,22 @@ public interface IWebDavClient : IDisposable
/// <returns>An instance of <see cref="WebDavResponse" />.</returns>
Task<WebDavResponse> PutFile(Uri requestUri, Stream stream, PutFileParameters parameters);

/// <summary>
/// Requests the resource to be stored under the request URI.
/// </summary>
/// <param name="requestUri">A string that represents the request URI.</param>
/// <param name="content">The content to pass to the request.</param>
/// <returns>An instance of <see cref="WebDavResponse" />.</returns>
Task<WebDavResponse> PutFile(string requestUri, HttpContent content);

/// <summary>
/// Requests the resource to be stored under the request URI.
/// </summary>
/// <param name="requestUri">The <see cref="Uri"/> to request.</param>
/// <param name="content">The content to pass to the request.</param>
/// <returns>An instance of <see cref="WebDavResponse" />.</returns>
Task<WebDavResponse> PutFile(Uri requestUri, HttpContent content);

/// <summary>
/// Requests the resource to be stored under the request URI.
/// </summary>
Expand Down
10 changes: 10 additions & 0 deletions src/WebDav.Client/WebDavClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,16 @@ public Task<WebDavResponse> PutFile(Uri requestUri, Stream stream, PutFileParame
return PutFile(requestUri, new StreamContent(stream), parameters);
}

public Task<WebDavResponse> PutFile(string requestUri, HttpContent content)
{
return PutFile(CreateUri(requestUri), content, new PutFileParameters());
}

public Task<WebDavResponse> PutFile(Uri requestUri, HttpContent content)
{
return PutFile(requestUri, content, new PutFileParameters());
}

public Task<WebDavResponse> PutFile(string requestUri, HttpContent content, PutFileParameters parameters)
{
return PutFile(CreateUri(requestUri), content, parameters);
Expand Down

0 comments on commit f162767

Please sign in to comment.