Interface IHttpService
- Namespace
- Akavache
- Assembly
- Akavache.dll
Represents a service that provides HTTP functionality for downloading and caching web resources.
- Extension Methods
Methods
DownloadUrl(IBlobCache, string, HttpMethod?, IEnumerable<KeyValuePair<string, string>>?, bool, DateTimeOffset?)
Downloads data from a URL and caches it, using the URL as the cache key.
IObservable<byte[]> DownloadUrl(IBlobCache blobCache, string url, HttpMethod? method = null, IEnumerable<KeyValuePair<string, string>>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
Parameters
blobCacheIBlobCache The blob cache to store the downloaded data.
urlstringThe URL to download from.
methodHttpMethod The HTTP method to use for the request.
headersIEnumerable<KeyValue <string, string>>Pair Optional HTTP headers to include in the request.
fetchAlwaysboolA value indicating whether to always fetch from the web, bypassing the cache.
absoluteExpirationDateTime ?Offset An optional expiration date for the cached data.
Returns
- IObservable<byte[]>
An observable that emits the downloaded byte data.
DownloadUrl(IBlobCache, string, string, HttpMethod?, IEnumerable<KeyValuePair<string, string>>?, bool, DateTimeOffset?)
Downloads data from a URL and caches it using a custom cache key.
IObservable<byte[]> DownloadUrl(IBlobCache blobCache, string key, string url, HttpMethod? method = null, IEnumerable<KeyValuePair<string, string>>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
Parameters
blobCacheIBlobCache The blob cache to store the downloaded data.
keystringThe custom key to use for the cache entry.
urlstringThe URL to download from.
methodHttpMethod The HTTP method to use for the request.
headersIEnumerable<KeyValue <string, string>>Pair Optional HTTP headers to include in the request.
fetchAlwaysboolA value indicating whether to always fetch from the web, bypassing the cache.
absoluteExpirationDateTime ?Offset An optional expiration date for the cached data.
Returns
- IObservable<byte[]>
An observable that emits the downloaded byte data.
DownloadUrl(IBlobCache, string, Uri, HttpMethod?, IEnumerable<KeyValuePair<string, string>>?, bool, DateTimeOffset?)
Downloads data from a URL and caches it using a custom cache key.
IObservable<byte[]> DownloadUrl(IBlobCache blobCache, string key, Uri url, HttpMethod? method = null, IEnumerable<KeyValuePair<string, string>>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
Parameters
blobCacheIBlobCache The blob cache to store the downloaded data.
keystringThe custom key to use for the cache entry.
urlUriThe URL to download from.
methodHttpMethod The HTTP method to use for the request.
headersIEnumerable<KeyValue <string, string>>Pair Optional HTTP headers to include in the request.
fetchAlwaysboolA value indicating whether to always fetch from the web, bypassing the cache.
absoluteExpirationDateTime ?Offset An optional expiration date for the cached data.
Returns
- IObservable<byte[]>
An observable that emits the downloaded byte data.
DownloadUrl(IBlobCache, Uri, HttpMethod?, IEnumerable<KeyValuePair<string, string>>?, bool, DateTimeOffset?)
Downloads data from a URL and caches it, using the URL as the cache key.
IObservable<byte[]> DownloadUrl(IBlobCache blobCache, Uri url, HttpMethod? method = null, IEnumerable<KeyValuePair<string, string>>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
Parameters
blobCacheIBlobCache The blob cache to store the downloaded data.
urlUriThe URL to download from.
methodHttpMethod The HTTP method to use for the request.
headersIEnumerable<KeyValue <string, string>>Pair Optional HTTP headers to include in the request.
fetchAlwaysboolA value indicating whether to always fetch from the web, bypassing the cache.
absoluteExpirationDateTime ?Offset An optional expiration date for the cached data.
Returns
- IObservable<byte[]>
An observable that emits the downloaded byte data.