Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public void SendMessage(IDictionary<string, string> message)
  2. {
  3. var client = new RestClient(MahUrl);
  4. var request = new RestRequest(Method.POST);
  5. var json = new JObject();
  6.  
  7. foreach (var pair in message)
  8. {
  9. json.Add(pair.Key, pair.Value);
  10. }
  11. json = new JObject(new JProperty("message", json));
  12. // {
  13. // "message":
  14. // {
  15. // "prop1": "val1",
  16. // "foo": "bar",
  17. // "batman": "robin"
  18. // }
  19. // }
  20.  
  21. // not quite sure here
  22. request.?
  23.  
  24. // send request
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement