DownloadFileFromHTTP
Downloads data from the given HTTP URL. If context is canceled then the request will be canceled.
def DownloadFileFromHTTP(
ctx: context.Context,
ref: storage.DataReference
) - > io.ReadCloser
Downloads data from the given HTTP URL. If context is canceled then the request will be canceled.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the HTTP request, used to manage cancellation and timeouts. |
| ref | storage.DataReference | The data reference containing the HTTP URL from which to download the file. |
Returns
| Type | Description |
|---|---|
io.ReadCloser | A ReadCloser containing the body of the HTTP response, or an error if the download fails. |