(SUBSCRIBER)
MAILUP API INTEGRATION IN ASP.NET WITH C#
string retCode = "1";
string result = "";
string fieldName = "campo1;campo2;campo4"; //Field Name
string fieldValue ="campo1;campo2;campo4"; //Field Value
string list = ConfigurationManager.AppSettings["list"];
string group = ConfigurationManager.AppSettings["group"];
string url = "
http://d2e6c.s67.it/frontend/xmlSubscribe.aspx";
url
+= "?list=" + list + "&email=" + email + "&confirm=false" + "&group=" + group + "&csvFldNames=" + fieldName + "&csvFldValues=" + fieldValue;
System.Net.HttpWebRequest
wreq = System.Net.HttpWebRequest)System.Net.WebRequest.Create(url);
wreq.Method = "GET";
wreq.Timeout = 60000;
System.Net.HttpWebResponse
wr = (System.Net.HttpWebResponse)wreq.GetResponse();
if (wr.StatusCode == System.Net.HttpStatusCode.OK)
{
System.IO.Stream s =
wr.GetResponseStream();
System.Text.Encoding enc = System.Text.Encoding.GetEncoding("utf-8");
System.IO.StreamReader
readStream = new System.IO.StreamReader(s, enc);
result =
readStream.ReadToEnd();
}
No comments:
Post a Comment