Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public confirmationStatus Send(string phoneNumber, string text)
- {
- messages_send model = new messages_send() { contacts = new List<string>() { phoneNumber }, text=text };
- string url = this.setupUrl();
- string dataToSend = new JavaScriptSerializer().Serialize(model);
- var cli = new WebClient();
- cli.Headers[HttpRequestHeader.ContentType] = "application/json";
- string response = cli.UploadString(url, dataToSend);
- return new JavaScriptSerializer().Deserialize<confirmationStatus>(response);
- }
- POST https://api.***.com/v1/messages? HTTP/1.1
- Content-Type: application/json
- Host: api.**.com
- Content-Length: 1061
- Expect: 100-continue
- Connection: Keep-Alive
- {"contacts":["+1*****9"],"text":"**??HME??????** John,??? 01-01-0001 ???? 12:00 AM ? 12:00 AM? ????????????????????: Link: https://www.****.com/timesheets/?v=0 .Text STOP "}
Add Comment
Please, Sign In to add comment