Powershell POST to pushgateway

Hi
What is the powershell command equivalent to:
$ echo 'metricname1 101' | curl --data-binary @- http://localhost:9091/metrics/job/jobname1/instance/instancename1

I got this error :
Invoke-WebRequest -Uri 'http://192.168.1.111:9091/metrics/job/jobname1/instance/instancename1' -Method Post -Body 'metricname1 101' -ContentType 'application/octet-stream'
Invoke-WebRequest : text format parsing error in line 1: unexpected end of input stream

I am facing the same issue here:
hxxps://stackoverflow.com/questions/68818211/send-metrics-with-pushgateway-prometheus-using-windows-console
But the solution mentioned did not work for me.

echo "metricname1 101
" | Invoke-WebRequest -Uri http://192.168.1.111:9091/metrics/job/jobname1 -Method POST

Invoke-WebRequest : text format parsing error in line 1: expected float as value, got “101\r”