示例#1
0
        public async Task <ApiResponse <TResult> > InvokeCreateRequestAsync <TResult>(Uri uri, IDictionary <string, object> parameters)
        {
            var builder = new MultipartDataFormRequestBuilder();

            builder.Add(parameters);

            var request = CreateRequest(uri, WebRequestMethods.Http.Post);
            await builder.ApplyToAsync(request);

            return(await EvaluateAsync <TResult>(await ExecuteRequestAsync(request)));
        }
示例#2
0
        public ApiResponse <TResult> InvokeCreateRequest <TResult>(Uri uri, IDictionary <string, object> parameters)
        {
            var builder = new MultipartDataFormRequestBuilder();

            builder.Add(parameters);

            var request = CreateRequest(uri, WebRequestMethods.Http.Post);

            builder.ApplyTo(request);

            return(Evaluate <TResult>(ExecuteRequest(request)));
        }