title: Send zip file using web service
body: <p>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:</p>
  
  <p><a href="https://i.stack.imgur.com/aO3PC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aO3PC.png" alt="enter image description here"></a></p>
  
  <p>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.</p>
  
  <p>EDIT: This is my recent version</p>
  
  <pre><code>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;
  }
  </code></pre>