Découvrez comment utiliser l’API de configuration pour configurer une application ASP.NET Core.
A few years back I wrote a post about Accepting Raw Request Content with ASP.NET Web API. Unfortunately the process to get at raw request data is rather indirect, with no direct way to receive raw data into Controller action parameters and that hasn't really changed in ASP.NET Core's MVC/API implementation. The way the Conneg algorithm works in regards to generic data formats is roughly the same as it was with Web API.
The good news is that it's quite a bit easier to create custom formatters in ASP.NET Core that let you customize how to handle 'unknown' content types in your controllers.
Let's take a look.
public class GetRandomGif : IGetRandomGif
{
public async Task
{
const string giphyKey = "";
using (var client = new HttpClient())
{
var url = new Uri($"http://api.giphy.com/v1/gifs/search?api_key={giphyKey}&q={searchCritera}&limit=1");
var response = await client.GetAsync(url);
string json;
using (var content = response.Content)
{
json = await content.ReadAsStringAsync();
}
return JsonConvert.DeserializeObject
}
}
}
un nuget pour lire les flux RSS en .net Core
et le site du projet
https://github.com/RobThree/SimpleFeedReader
Heres how I got OSX on my Acer Aspire 5740G Laptop Specs: Intel Core i5 430M 4GB Ram 500 Gb HDD ATI Mobility Radeon HD 5650 1GB Cost me 700$ (pr...