It is simple/Self-explanatory code. There is not much to comment.
Any other requirements?
You can pay if you like.
class CFDNSRecord
{
public string tkn { get; set; }
public string email { get; set; }
public string requestURI { get; set; }
public string act { get; set; }
//Object will be created with default values of requestURI and act variables
public CFDNSRecord(string tkn, string email)
{
[login to view URL] = tkn;
[login to view URL] = email;
[login to view URL] = "[login to view URL]";
[login to view URL] = "rec_load_all";
}
public async Task<string> getDNSRecord(string website)
{
var client = new HttpClient();
string JSONresult = "";
// Create the parameter string to be posted.
var requestContent = new FormUrlEncodedContent(new[] {
new KeyValuePair<string, string>("email", email),
new KeyValuePair<string, string>("tkn", tkn),
new KeyValuePair<string, string>("a", act),
new KeyValuePair<string, string>("z", website),
});
// Get the response.
HttpResponseMessage response = await [login to view URL](requestURI, requestContent);
// Get the content of the response
HttpContent responseContent = [login to view URL];
// Read the content
using ([login to view URL] reader = new [login to view URL](await [login to view URL]()))
{
// Retrive the output.
JSONresult = await [login to view URL]();
}
return JSONresult;
}
}