18 lines
658 B
C#
18 lines
658 B
C#
using System.Net.Http.Headers;
|
|
using YandexMusic.API.Requests.Common;
|
|
|
|
namespace YandexMusic.API.Requests;
|
|
|
|
/// <summary>Базовый класс для запросов к Passport (passport.yandex.ru).</summary>
|
|
internal abstract class YAuthRequestBuilder<TResponse, TParams> : YJsonRequestBuilder<TResponse, TParams>
|
|
{
|
|
protected override string BaseUrl => YConstants.Endpoints.PassportUrl;
|
|
|
|
protected YAuthRequestBuilder(YandexMusicApi api) : base(api) { }
|
|
|
|
protected override void SetCustomHeaders(HttpRequestHeaders headers)
|
|
{
|
|
base.SetCustomHeaders(headers);
|
|
headers.Add("X-Requested-With", "XMLHttpRequest");
|
|
}
|
|
} |