Perform a multipart post with file upload using HttpClient:

            string user = "test@test.com";
            string password = "a0999ca0902";
            string baseUrl = "http://test.com/test/api/";
            string fileName = "info.xml";
            string filePath = System.Web.Hosting.HostingEnvironment.MapPath("~/Content/" + fileName);

            using (var client = new HttpClient())
            {
                string basicAuth = Convert.ToBase64String(Encoding.ASCII.GetBytes(user  + ":" + password ));

                client.BaseAddress = new Uri(baseUrl);
                client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", basicAuth);

                using (var content = new MultipartFormDataContent())
                {
                    //var values = new[]
                    //{
                    //    new KeyValuePair<string, string>("Param1", "Value1"),
                    //    new KeyValuePair<string, string>("Param2", "Value2"),
                    //};

                    //foreach (var keyValuePair in values)
                    //{
                    //    content.Add(new StringContent(keyValuePair.Value), keyValuePair.Key);
                    //}

                    var fileContent = new ByteArrayContent(System.IO.File.ReadAllBytes(filePath));
                    fileContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data")
                    {
                        Name = "uploadedfile",
                        FileName = fileName,
                    };
                    content.Add(fileContent);

                    var requestUri = "files/upload";
                    var result = client.PostAsync(requestUri, content).Result;
                }
            }