Lol, 10sec after i find the solution :
public T SendRequest<T>(string urlRequest, string p_method, string p_acces_token)
{
Thread.Sleep(100);
JsonSerializer js = new JsonSerializer();
var httpWebRequest = (HttpWebRequest)WebRequest.Create(urlRequest);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Accept = "application/vnd.twitchtv.v3+json";
httpWebRequest.Method = p_method;
httpWebRequest.Headers.Add("Authorization: OAuth "+p_acces_token);
if (p_method == "PUT")
{
httpWebRequest.ContentLength = 0;
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
T answer = JsonConvert.DeserializeObject<T>(streamReader.ReadToEnd());
return answer;
}
}
just add to Content-Length : 0