Advertisement
FrayxRulez

MultipartFormDataContent

Apr 26th, 2015
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1.             StorageFile file;
  2.             var content = new MultipartFormDataContent();
  3.             content.Add(new StreamContent(await file.OpenStreamForReadAsync()), "name", "fileName");
  4.  
  5.             var client = new HttpClient();
  6.             var request = new HttpRequestMessage(HttpMethod.Post, "url");
  7.             request.Content = content;
  8.  
  9.             var response = await client.SendAsync(request);
  10.             if (response.IsSuccessStatusCode)
  11.             {
  12.  
  13.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement