I have created a web service using .NET Web API. The web service part works great, I am able to send the zip file using Advanced REST Client. The problem is that I can't send the zip file programmatically. Here is the Advanced REST Client Request Headers:
I have try some things but without success. I am not posting what I have try, considering that this is basic stuff for web developers (I am desktop developer), but if it is necessary, I will. Thank you in advance.
EDIT: This is my recent version
private async void BeginUpdate(bool webserverStatus)
{
if (!webserverStatus) return;
var httpClient = new HttpClient();
var form = new MultipartFormDataContent();
var byteArray = File.ReadAllBytes("myUpdatePackage.zip");
form.Add(new ByteArrayContent(byteArray, 0, byteArray.Length), "myUpdatePackage", "myUpdatePackage.zip");
HttpResponseMessage response = await httpClient.PostAsync(@"http://localhost:9000/api/file/", form);
response.EnsureSuccessStatusCode();
httpClient.Dispose();
string sd = response.Content.ReadAsStringAsync().Result;
}