Skip to content

Instantly share code, notes, and snippets.

@rajivmanivannan
Last active September 23, 2020 12:39
Show Gist options
  • Save rajivmanivannan/87ad28ac5c8dee5c54a736818ed9d56c to your computer and use it in GitHub Desktop.
Save rajivmanivannan/87ad28ac5c8dee5c54a736818ed9d56c to your computer and use it in GitHub Desktop.
Sample method
/// <summary>
/// Asynchronously performs a command on the resource with the specified <paramref name="uri" />.
/// </summary>
/// <param name="verb">The HTTP verb of the request.</param>
/// <param name="uri">The URI to get.</param>
/// <param name="body">The body.</param>
/// <param name="headers">Headers to set in the outgoing request.</param>
/// <param name="identity">The identity of the user.</param>
/// <param name="cancellationToken">The optional token to monitor for cancellation requests.</param>
/// <returns>A <see cref="Task{TResult}"/> whose result yields the resource of the specific <paramref name="uri"/>.</returns>
Task<string> SendAndGetStringResponseAsync(HttpMethod verb, Uri uri, object body, IDictionary<string, string> headers, WindowsIdentity identity = null, CancellationToken cancellationToken = default(CancellationToken));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment