Skip to content

},System.Boolean,System.Nullable{System.DateTimeOffset})} },System.Boolean,System.Nullable{System.DateTimeOffset})} },System.Boolean,System.Nullable{System.DateTimeOffset})} },System.Boolean,System.Nullable{System.DateTimeOffset})}

IHttpService.DownloadUrl(IBlobCache, string, HttpMethod?, IEnumerable>?, bool, DateTimeOffset?) method

Defined in

Type: IHttpService Namespace: Akavache Assembly: Akavache.HttpDownloader.dll

Applies to

net10.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net10.0-android36.0, net10.0-ios26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net9.0, net9.0-windows10.0.19041, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net481, net462

Overloads

  • 1. IObservable<byte[]> DownloadUrl(IBlobCache blobCache, string url, HttpMethod? method = null, IEnumerable<KeyValuePair<string, string>>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
  • 2. IObservable<byte[]> DownloadUrl(IBlobCache blobCache, Uri url, HttpMethod? method = null, IEnumerable<KeyValuePair<string, string>>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
  • 3. IObservable<byte[]> DownloadUrl(IBlobCache blobCache, string key, string url, HttpMethod? method = null, IEnumerable<KeyValuePair<string, string>>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)
  • 4. IObservable<byte[]> DownloadUrl(IBlobCache blobCache, string key, Uri url, HttpMethod? method = null, IEnumerable<KeyValuePair<string, string>>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null)

1. Overload

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

Summary: Downloads data from a URL and caches it, using the URL as the cache key.

Parameters

NameTypeDescription
blobCache[IBlobCache](#The blob cache to store the downloaded data.
urlstringThe URL to download from.
method = nullHttpMethod?The HTTP method to use for the request.
headers = nullIEnumerable>?Optional HTTP headers to include in the request.
fetchAlways = falseboolA value indicating whether to always fetch from the web, bypassing the cache.
absoluteExpiration = nullDateTimeOffset?An optional expiration date for the cached data.

Returns: IObservable -- An observable that emits the downloaded byte data.

2. Overload

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

Summary: Downloads data from a URL and caches it, using the URL as the cache key.

Parameters

NameTypeDescription
blobCache[IBlobCache](#The blob cache to store the downloaded data.
urlUriThe URL to download from.
method = nullHttpMethod?The HTTP method to use for the request.
headers = nullIEnumerable>?Optional HTTP headers to include in the request.
fetchAlways = falseboolA value indicating whether to always fetch from the web, bypassing the cache.
absoluteExpiration = nullDateTimeOffset?An optional expiration date for the cached data.

Returns: IObservable -- An observable that emits the downloaded byte data.

3. Overload

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

Summary: Downloads data from a URL and caches it using a custom cache key.

Parameters

NameTypeDescription
blobCache[IBlobCache](#The blob cache to store the downloaded data.
keystringThe custom key to use for the cache entry.
urlstringThe URL to download from.
method = nullHttpMethod?The HTTP method to use for the request.
headers = nullIEnumerable>?Optional HTTP headers to include in the request.
fetchAlways = falseboolA value indicating whether to always fetch from the web, bypassing the cache.
absoluteExpiration = nullDateTimeOffset?An optional expiration date for the cached data.

Returns: IObservable -- An observable that emits the downloaded byte data.

4. Overload

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

Summary: Downloads data from a URL and caches it using a custom cache key.

Parameters

NameTypeDescription
blobCache[IBlobCache](#The blob cache to store the downloaded data.
keystringThe custom key to use for the cache entry.
urlUriThe URL to download from.
method = nullHttpMethod?The HTTP method to use for the request.
headers = nullIEnumerable>?Optional HTTP headers to include in the request.
fetchAlways = falseboolA value indicating whether to always fetch from the web, bypassing the cache.
absoluteExpiration = nullDateTimeOffset?An optional expiration date for the cached data.

Returns: IObservable -- An observable that emits the downloaded byte data.