Class HttpMixinExtensions
- Namespace
- Akavache
- Assembly
- Akavache.Core.dll
Set of extension methods that provide Http functionality to the IBlob
- Inheritance
-
Http
Mixin Extensions
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
stringThe URL to download.
headers
IDictionary<string, string>An optional Dictionary containing the HTTP request headers.
fetchAlways
boolForce a web request to always be issued, skipping the cache.
absoluteExpiration
DateTime ?Offset 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
stringThe key to store with.
url
stringThe URL to download.
headers
IDictionary<string, string>An optional Dictionary containing the HTTP request headers.
fetchAlways
boolForce a web request to always be issued, skipping the cache.
absoluteExpiration
DateTime ?Offset 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
stringThe key to store with.
url
UriThe URL to download.
headers
IDictionary<string, string>An optional Dictionary containing the HTTP request headers.
fetchAlways
boolForce a web request to always be issued, skipping the cache.
absoluteExpiration
DateTime ?Offset 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
UriThe URL to download.
headers
IDictionary<string, string>An optional Dictionary containing the HTTP request headers.
fetchAlways
boolForce a web request to always be issued, skipping the cache.
absoluteExpiration
DateTime ?Offset 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
stringThe URL to download.
headers
IDictionary<string, string>An optional Dictionary containing the HTTP request headers.
fetchAlways
boolForce a web request to always be issued, skipping the cache.
absoluteExpiration
DateTime ?Offset 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
stringThe key to store with.
url
stringThe URL to download.
headers
IDictionary<string, string>An optional Dictionary containing the HTTP request headers.
fetchAlways
boolForce a web request to always be issued, skipping the cache.
absoluteExpiration
DateTime ?Offset 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
stringThe key to store with.
url
UriThe URL to download.
headers
IDictionary<string, string>An optional Dictionary containing the HTTP request headers.
fetchAlways
boolForce a web request to always be issued, skipping the cache.
absoluteExpiration
DateTime ?Offset 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
UriThe URL to download.
headers
IDictionary<string, string>An optional Dictionary containing the HTTP request headers.
fetchAlways
boolForce a web request to always be issued, skipping the cache.
absoluteExpiration
DateTime ?Offset An optional expiration date.
Returns
- IObservable<byte[]>
The data downloaded from the URL.