public static IAdvancedHttpBuilder WithAutoDecompression(this IAdvancedHttpBuilder builder, bool enabled = true) { builder.WithConfiguration(s => s.AutoDecompression = true); return(builder.WithClientConfiguration(c => c.WithDecompressionMethods(enabled ? DecompressionMethods.GZip | DecompressionMethods.Deflate : DecompressionMethods.None))); }
public static IAdvancedHttpBuilder WithTimeout(this IAdvancedHttpBuilder builder, TimeSpan?timeout) { return(builder.WithClientConfiguration(c => c.WithTimeout(timeout))); }
public static IAdvancedHttpBuilder WithAppendHeader(this IAdvancedHttpBuilder builder, string name, IEnumerable <string> values) { return(builder.WithClientConfiguration(c => c.WithAppendHeader(name, values))); }
public static IAdvancedHttpBuilder WithHeader(this IAdvancedHttpBuilder builder, string name, string value) { return(builder.WithClientConfiguration(c => c.WithHeader(name, value))); }
public static IAdvancedHttpBuilder WithHeadersConfiguration(this IAdvancedHttpBuilder builder, Action <HttpRequestHeaders> configuration) { return(builder.WithClientConfiguration(c => c.WithHeadersConfiguration(configuration))); }
public static IAdvancedHttpBuilder WithNoCache(this IAdvancedHttpBuilder builder, bool nocache = true) { return(builder.WithClientConfiguration(c => c.WithNoCache(nocache))); }