i am sending sms on mobile through plivo and then user will reply me by yes or No to receive sms on my plivo. Now i have make class in c# and put this code
using System;
using System.Collections.Generic;
using System.Reflection;
using Nancy;
using RestSharp;
using Plivo.API;
namespace Receive_Sms
{
public class Program : NancyModule
{
public Program()
{
Post["/receive_sms"] = x =>
{
String from_number = Request.Form["From"]; // Sender's phone number
String to_number = Request.Form["To"]; // Receiver's phone number
String text = Request.Form["Text"]; // The text which was received
// Print the message
Console.WriteLine("Message received - From: {0}, To: {1}, Text: {2}", from_number, to_number, text);
return "Message received";
};
}
}
}
can i use this code in webservice.asmx if yes how? how do i test this code? while creating application in message url what i write in after server url class name or method name? e.g. http://example.com/receive_sms