Table of Contents

Class HttpMixinExtensions

Namespace
Akavache
Assembly
Akavache.Core.dll

Set of extension methods that provide Http functionality to the IBlobCache interface.

public static class HttpMixinExtensions
Inheritance
HttpMixinExtensions

Methods

DownloadUrl(IBlobCache, HttpMethod, string, IDictionary<string, string>?, bool, DateTimeOffset?)

Download data from an HTTP URL and insert the result into the cache. If the data is already in the cache, this returns a cached value. The URL itself is used as the key.

public static IObservable<byte[]> DownloadUrl(this IBlobCache blobCache, HttpMethod method, string url, IDictionary<string, string>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

Parameters

blobCache IBlobCache

The blob cache to perform the operation on.

method HttpMethod

The type of HTTP Method.

url string

The URL to download.

headers IDictionary<string, string>

An optional Dictionary containing the HTTP request headers.

fetchAlways bool

Force a web request to always be issued, skipping the cache.

absoluteExpiration DateTimeOffset?

An optional expiration date.

Returns

IObservable<byte[]>

The data downloaded from the URL.

DownloadUrl(IBlobCache, HttpMethod, string, string, IDictionary<string, string>?, bool, DateTimeOffset?)

Download data from an HTTP URL and insert the result into the cache. If the data is already in the cache, this returns a cached value. An explicit key is provided rather than the URL itself.

public static IObservable<byte[]> DownloadUrl(this IBlobCache blobCache, HttpMethod method, string key, string url, IDictionary<string, string>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

Parameters

blobCache IBlobCache

The blob cache to perform the operation on.

method HttpMethod

The type of HTTP Method.

key string

The key to store with.

url string

The URL to download.

headers IDictionary<string, string>

An optional Dictionary containing the HTTP request headers.

fetchAlways bool

Force a web request to always be issued, skipping the cache.

absoluteExpiration DateTimeOffset?

An optional expiration date.

Returns

IObservable<byte[]>

The data downloaded from the URL.

DownloadUrl(IBlobCache, HttpMethod, string, Uri, IDictionary<string, string>?, bool, DateTimeOffset?)

Download data from an HTTP URL and insert the result into the cache. If the data is already in the cache, this returns a cached value. An explicit key is provided rather than the URL itself.

public static IObservable<byte[]> DownloadUrl(this IBlobCache blobCache, HttpMethod method, string key, Uri url, IDictionary<string, string>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

Parameters

blobCache IBlobCache

The blob cache to perform the operation on.

method HttpMethod

The type of HTTP Method.

key string

The key to store with.

url Uri

The URL to download.

headers IDictionary<string, string>

An optional Dictionary containing the HTTP request headers.

fetchAlways bool

Force a web request to always be issued, skipping the cache.

absoluteExpiration DateTimeOffset?

An optional expiration date.

Returns

IObservable<byte[]>

The data downloaded from the URL.

DownloadUrl(IBlobCache, HttpMethod, Uri, IDictionary<string, string>?, bool, DateTimeOffset?)

Download data from an HTTP URL and insert the result into the cache. If the data is already in the cache, this returns a cached value. The URL itself is used as the key.

public static IObservable<byte[]> DownloadUrl(this IBlobCache blobCache, HttpMethod method, Uri url, IDictionary<string, string>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

Parameters

blobCache IBlobCache

The blob cache to perform the operation on.

method HttpMethod

The type of HTTP Method.

url Uri

The URL to download.

headers IDictionary<string, string>

An optional Dictionary containing the HTTP request headers.

fetchAlways bool

Force a web request to always be issued, skipping the cache.

absoluteExpiration DateTimeOffset?

An optional expiration date.

Returns

IObservable<byte[]>

The data downloaded from the URL.

DownloadUrl(IBlobCache, string, IDictionary<string, string>?, bool, DateTimeOffset?)

Download data from an HTTP URL and insert the result into the cache. If the data is already in the cache, this returns a cached value. The URL itself is used as the key.

public static IObservable<byte[]> DownloadUrl(this IBlobCache blobCache, string url, IDictionary<string, string>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

Parameters

blobCache IBlobCache

The blob cache to perform the operation on.

url string

The URL to download.

headers IDictionary<string, string>

An optional Dictionary containing the HTTP request headers.

fetchAlways bool

Force a web request to always be issued, skipping the cache.

absoluteExpiration DateTimeOffset?

An optional expiration date.

Returns

IObservable<byte[]>

The data downloaded from the URL.

DownloadUrl(IBlobCache, string, string, IDictionary<string, string>?, bool, DateTimeOffset?)

Download data from an HTTP URL and insert the result into the cache. If the data is already in the cache, this returns a cached value. An explicit key is provided rather than the URL itself.

public static IObservable<byte[]> DownloadUrl(this IBlobCache blobCache, string key, string url, IDictionary<string, string>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

Parameters

blobCache IBlobCache

The blob cache to perform the operation on.

key string

The key to store with.

url string

The URL to download.

headers IDictionary<string, string>

An optional Dictionary containing the HTTP request headers.

fetchAlways bool

Force a web request to always be issued, skipping the cache.

absoluteExpiration DateTimeOffset?

An optional expiration date.

Returns

IObservable<byte[]>

The data downloaded from the URL.

DownloadUrl(IBlobCache, string, Uri, IDictionary<string, string>?, bool, DateTimeOffset?)

Download data from an HTTP URL and insert the result into the cache. If the data is already in the cache, this returns a cached value. An explicit key is provided rather than the URL itself.

public static IObservable<byte[]> DownloadUrl(this IBlobCache blobCache, string key, Uri url, IDictionary<string, string>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

Parameters

blobCache IBlobCache

The blob cache to perform the operation on.

key string

The key to store with.

url Uri

The URL to download.

headers IDictionary<string, string>

An optional Dictionary containing the HTTP request headers.

fetchAlways bool

Force a web request to always be issued, skipping the cache.

absoluteExpiration DateTimeOffset?

An optional expiration date.

Returns

IObservable<byte[]>

The data downloaded from the URL.

DownloadUrl(IBlobCache, Uri, IDictionary<string, string>?, bool, DateTimeOffset?)

Download data from an HTTP URL and insert the result into the cache. If the data is already in the cache, this returns a cached value. The URL itself is used as the key.

public static IObservable<byte[]> DownloadUrl(this IBlobCache blobCache, Uri url, IDictionary<string, string>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

Parameters

blobCache IBlobCache

The blob cache to perform the operation on.

url Uri

The URL to download.

headers IDictionary<string, string>

An optional Dictionary containing the HTTP request headers.

fetchAlways bool

Force a web request to always be issued, skipping the cache.

absoluteExpiration DateTimeOffset?

An optional expiration date.

Returns

IObservable<byte[]>

The data downloaded from the URL.