$Data empty since 4.1.0

I am trying to upload files using Endpoint. I use the $Data variable to get the content of the file. Up until version 4.0.12, it is working fine but since 4.1.0, $Data is null.
I follow the documentation: Endpoints - PowerShell Universal

I created a simple Endpoint just returning $Data
I invoke using: Invoke-WebRequest https://MYSITE/test1 -Method POST -InFile C:\Temp\test.txt -ContentType ‘text/csv’
Also tried without “ContentType”

Is there anything missing?


I trie

Product: PowerShell Universal
Version: 4.1.x

Thank you, 4.1.6 solved the issue !

1 Like