This example sends a POST request with a parser name and text to analyse to the Vdk-Service, checks for a successful response, and prints the response body.
C# Example
C#
using System.Text.Json;
using System.Net.WebSockets;
using System.Text;
using (var client = new HttpClient())
{
var request = new { parser = "myParser", text = "decrease the heat in 2 min" };
const string parseUri = "http://localhost:39806/v1/nlu/parse";
var content = new StringContent(JsonSerializer.Serialize(request), Encoding.UTF8, "application/json");
var response = await client.PostAsync(parseUri, content);
response.EnsureSuccessStatusCode();
var responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}