Invoke-QlikDownload.ps1

function Invoke-QlikDownload {
    <#
    .SYNOPSIS
    This function ...
 
    .DESCRIPTION
    A bit more description
 
    .PARAMETER FromPipeline
    Shows how to process input from the pipeline, remaining parameters or by named parameter.
 
    .EXAMPLE
    Invoke-QlikDownload 'abc'
 
    Description of the example.
 
    #>


    <# Enable -Confirm and -WhatIf. #>
    [CmdletBinding(SupportsShouldProcess = $true)]
    param(
        [parameter(Mandatory=$true,Position=0)]
    [string]$path,
    [parameter(Mandatory=$true,Position=1)]
    [string]$filename
    )

    begin {
    }

    process {
    $params = @{
      OutFile = $filename
    }

    return CallRestUri Get $path $params
  }

    end {
    }
}

if ($loadingModule) {
    Export-ModuleMember -Function 'Invoke-QlikDownload'
}