protected virtual HttpRequestMessage CreateRequest(GetAttachmentCommand cmd) { var req = new HttpRequest(HttpMethod.Get, GenerateRequestUrl(cmd.DocId, cmd.DocRev, cmd.Name)); req.SetIfMatch(cmd.DocRev); return req; }
public virtual async Task<AttachmentResponse> GetAsync(GetAttachmentCommand cmd) { Ensure.That(cmd, "cmd").IsNotNull(); var req = CreateRequest(cmd); var res = SendAsync(req); return ProcessAttachmentResponse(await res.ForAwait()); }