I read this post that was not addressed and am wondering if it is possible to create custom integrations with C#.
If so could you give me some instructions on how go about this process?
Thank you.
Here is the code the original person posted.
private async Task SendResponseToExternalURLAsync()
{
using (var client = new HttpClient())
{
string url = "http://localhost:8090/api/devices/55f82cdb2868217b/queue";
var queueItem = new
{
confirmed = true,
data = "68...64",
fCntDown = 1,
fPort = 1,
id = "55f8...68217b",
};
var jsonContent = JsonConvert.SerializeObject(new { queueItem });
client.DefaultRequestHeaders.Add("Authorization", "Bearer ElRdTOs-HvLXbY37clc...");
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
return await client.PostAsync(url, new StringContent(jsonContent, Encoding.UTF8, "application/json"));
}
}