public virtual async Task <TSubResponseResource> PostAsync <TSubResource, TSubResponseResource>(Action <TSubResource> postAction, Action < IRequestOptions <TSubResponseResource> > options) where TSubResource : class, TResource where TSubResponseResource : TPostResponseResource { return((TSubResponseResource)await Client.PostAsync(Uri, postAction, RequestOptions.Create(options))); }
internal static Task <object> PostAsync <T>(this IPomonaClient client, string uri, Action <T> postAction, RequestOptions options) { if (client == null) { throw new ArgumentNullException(nameof(client)); } var postForm = client.TypeMapper.CreatePostForm(typeof(T)); postAction((T)postForm); return(client.PostAsync(uri, postForm, options)); }