https://www.stote.it/bais/%ID%
I have a URL like the above and a method that takes key. I want to replace ID with key and make a get request. I can make the get request if I manually replace ID with a value, but I want to do it in code. Any help?
private String getEmailTemplate(string key)
{
string html = string.Empty;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
using (Stream stream = response.GetResponseStream())
using (StreamReader reader = new StreamReader(stream))
{
html = reader.ReadToEnd();
}
return html;
url = url.Replace("%ID%", key);?