protected virtual HttpRequestMessage CreateRequest(PostDocumentCommand cmd) { var req = new HttpRequest(HttpMethod.Post, GenerateRequestUrl()); req.SetContent(cmd.Content); return req; }
public virtual async Task<DocumentHeaderResponse> PostAsync(PostDocumentCommand cmd) { Ensure.That(cmd, "cmd").IsNotNull(); var req = CreateRequest(cmd); var res = SendAsync(req); return ProcessDocumentHeaderResponse(await res.ForAwait()); }