How to get a CSV from a website into a variable?

Specifically, I’m trying to get our Azure Billing Report, which is a CSV file, and then write it to Azure blob storage.
As I am trying to do this from an Azure function, I don’t really have the luxury of writing to a file first AFAIK.

When I do this, everything is fine, and I get a nice CSV
Invoke-WebRequest $url -Headers $authHeaders -OutFile Billing.txt

When I do this, all I get is one big string of text:
$BlobStorageCSV = Invoke-WebRequest $url -Headers $authHeaders

My Azure Function would then write it to BlobStorage, but ideally not as one big string, but as a nice CSV…

I have also tried with Invoke-RestMethod, and specifying CSV as the output format, but no luck there either.
Also, the first two lines of the file is not in CSV format, which might make it trickier(?)…

Try this:

$BlobStorageCSV = Invoke-WebRequest $url -Headers $authHeaders | ConvertTo-Csv