LuisTalk.Models.Services.LuisService.GetIntent C# (CSharp) Method

GetIntent() public method

public GetIntent ( string text ) : Task
text string
return Task
        public async Task<LuisResult> GetIntent(string text)
        {
            using (var client = new HttpClient())
            {
                var url = _baseAddress.SetQueryParam("id", _id)
                    .SetQueryParam("subscription-key", _subscriptionKey)
                    .SetQueryParam("q", text);

                var response = await client.GetStringAsync(url);
                var luisResponse = JsonConvert.DeserializeObject<LuisResponse>(response);
                return LuisResult.FromLuisResponse(luisResponse);
            }
        }
    }