Advertisement
Guest User

Untitled

a guest
Jul 16th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. var method = new HttpMethod("PATCH");
  2. var patch_request = new HttpRequestMessage(method, each_well_url)
  3. {
  4. Content = httpContent
  5. };
  6.  
  7. HttpResponseMessage patch_response = new HttpResponseMessage();
  8. // In case you want to set a timeout
  9. //CancellationToken cancellationToken = new CancellationTokenSource(60).Token;
  10.  
  11. try
  12. {
  13. patch_response = await myClient.SendAsync(patch_request);
  14.  
  15. // If you want to use the timeout you set
  16. //response = await client.SendRequestAsync(request).AsTask(cancellationToken);
  17. }
  18. catch
  19. {
  20.  
  21. }
  22. }
  23.  
  24.  
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement