Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (HttpClient client = GetClient(cServerBaseAddress))
- {
- using (HttpResponseMessage response = await client.PostAsync(url, new ByteArrayContent(File.ReadAllBytes(cFilename))))
- {
- responseContent = await response.Content.ReadAsStringAsync();
- response.EnsureSuccessStatusCode();
- string newContentId = Newtonsoft.Json.Linq.JToken.Parse(
- response.Content.ReadAsStringAsync().Result).ToString();
- return newContentId;
- }
- }
Add Comment
Please, Sign In to add comment