public override IObservable <Unit> Execute() { var request = new UnityWebRequestBuilder() { Url = _url, HttpMethod = _httpMethod } .AddBasicAuthHeader(AuthorizationManager.Main.Login, AuthorizationManager.Main.Password); if (_model != null) { request.SetJsonBody(_model); } return(request.Execute().Select(_ => Unit.Default)); }
public virtual IObservable <TResponseModel> Execute() { var request = new UnityWebRequestBuilder() { Url = _url, HttpMethod = _httpMethod } .AddBasicAuthHeader(AuthorizationManager.Main.Login, AuthorizationManager.Main.Password); if (_model != null) { request.SetJsonBody(_model); } return(request .Execute() .SelectModel <TResponseModel>()); }