What you're looking for exists, it's powershell.
Invoke-WebRequest -Method 'Get' -Uri 'https://example.com'
And the response is a typed object:That you can pipe properly by piping objects not strings, e.g. :
Invoke-WebRequest -Method 'Get' -Uri 'https://example.com' | Select-Object -ExpandProperty Headers
Outputs: Key Value
--- -----
Age 438810
Vary Accept-Encoding
X-Cache HIT
Content-Length 1256
Cache-Control max-age=604800
Content-Type text/html; charset=UTF-8
Date Mon, 29 Jan 2024 15:08:42 GMT
Expires Mon, 05 Feb 2024 15:08:42 GMT
ETag "3147526947+ident"
Last-Modified Thu, 17 Oct 2019 07:18:26 GMT
Server ECS (nyb/1D15)