public static async Task <SendMessageResult> GetAsync( this IBackchannel client, string url, Action <IHttpRequestBuilder> configure = null) { return(await client.SendAsync(url, HttpMethod.Get, configure)); }
public static async Task <SendMessageResult> PatchAsync( this IBackchannel backchannel, string url, Action <IHttpRequestBuilder> configure = null) { return(await backchannel.SendAsync(url, new HttpMethod("PATCH"), configure)); }
public static async Task <SendMessageResult> DeleteAsync( this IBackchannel backchannel, string url, Action <IHttpRequestBuilder> configure = null) { return(await backchannel.SendAsync(url, HttpMethod.Delete, configure)); }
public GoogleOAuthClient( IOptions <GoogleOAuthOptions> options, IBackchannelFactory backchannelFactory) { var factory = Throw.IfNull(backchannelFactory, nameof(backchannelFactory)); this.options = Throw.IfNull(options, nameof(options)).Value; this.backchannel = factory.Create(); }
public ApiClient( IOptions <ApiOptions> options, IBackchannelFactory backchannelFactory, AuthHelper authHelper) { this.authHelper = Throw.IfNull(authHelper, nameof(authHelper)); this.backchannel = Throw .IfNull(backchannelFactory, nameof(backchannelFactory)) .Create(Throw.IfNull(options, nameof(options)).Value.BaseUrl); }
public GoogleCalendarClient( IOptions <GoogleCalendarOptions> options, IBackchannelFactory backchannelFactory, IMapper mapper) { var factory = Throw.IfNull(backchannelFactory, nameof(backchannelFactory)); var baseUrl = Throw.IfNull(options, nameof(options)).Value.BaseUrl; this.mapper = Throw.IfNull(mapper, nameof(mapper)); this.backchannel = factory.Create(baseUrl); }