got "101\r"suggests that you're sending a Windows newline (.....\r\n) instead of a Unix newline (.....\n), and that pushgateway isn't happy with that.
I don't know if Windows supports some mechanism for inserting explicit control sequences, such as
-Body 'metricname1 101\n'
or
echo -ne 'metricname1 101\n'