I have created a restful webservice like below
Opertation Contract
[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped,ResponseFormat = WebMessageFormat.Json, UriTemplate = "/PushNotification")]
[OperationContract]
void PushNotification(MailInformation mailInformations);
MailInformations class
[DataContract]
public class MailInformation
{
[DataMember]
public List<string> To { get; set; }
[DataMember]
public string SenderEmail { get; set; }
[DataMember]
public string Subject { get; set; }
}
How can i call this service using HttpWebrequest ?
My Service Url
localhost/Chat/ChatService.svc/PushNotification