Полностью переписанное api
All checks were successful
Release / pack-and-publish (release) Successful in 36s
All checks were successful
Release / pack-and-publish (release) Successful in 36s
This commit is contained in:
18
YandexMusic.API/Requests/Common/YAuthRequestBuilder.cs
Normal file
18
YandexMusic.API/Requests/Common/YAuthRequestBuilder.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Net.Http.Headers;
|
||||
using YandexMusic.API.Requests.Common;
|
||||
|
||||
namespace YandexMusic.API.Requests;
|
||||
|
||||
/// <summary>Базовый класс для запросов к Passport (passport.yandex.ru).</summary>
|
||||
public 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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user