I want to change the webpage title : <title>whatever I want</title> with c# code, so that I can build in the future dynamic pages.
I try a lot of things, but I cant change anything on the webpage, can anyone help me to give me some tips how to do that?
string baseurl = "mywebpage";
string userpass = "username" + ":" + "password";
string json = "a json string"
string encoded = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(userpass));
string encval = "Basic " + encoded;
var content = new StringContent(json, Encoding.UTF8, "application/json");
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("X-Atlassian-Token", "nocheck");
client.DefaultRequestHeaders.Add("Authorization", encval);
client.DefaultRequestHeaders.Add("Accept", "json");
await client.PostAsync(baseurl+"/rest/api/content/"+pageid, content);