SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top