private async Task Request(HttpMethod method, string endpoint, CancellationToken cancellationToken, ResourceScope?scope = null, params object[] parameters) { var request = new DiscordHttpRequest(method, endpoint, parameters) { Scope = scope ?? new ResourceScope(), }; using HttpResponseMessage response = await _client.Send(request, cancellationToken); }
private async Task Request <TIn>(HttpMethod method, string endpoint, TIn data, CancellationToken cancellationToken, ResourceScope?scope = null, params object[] parameters) { using HttpContent content = Serialize(data); var request = new DiscordHttpRequest(method, endpoint, parameters) { Content = content, Scope = scope ?? new ResourceScope(), }; using HttpResponseMessage response = await _client.Send(request, cancellationToken); }