using System.Collections.Generic; using System.Linq; using Jellyfin.Api.Constants; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; namespace Jellyfin.Api.Controllers { /// /// Controller for testing. /// [Route("Tests")] public class TestController : BaseJellyfinApiController { /// /// Initializes a new instance of the class. /// public TestController() { } /// /// Tests the url decoding. /// /// Parameters to echo back in the response. /// An . /// Information retrieved. [HttpGet("Decoding", Name = "TestUrlDecoding")] [ProducesResponseType(StatusCodes.Status200OK)] public ActionResult TestUrlDecoding([FromQuery]Dictionary? @params = null) { if (@params != null && @params.Count > 0) { Response.Headers.Add("querystring", string.Join("&", @params.Select(x => x.Key + "=" + x.Value))); } return Ok(); } } }