0

I ran this command from powershell on win10

curl http://127.0.0.1:8080/ -UseBasicParsing

and got lots of info

enter image description here

Is it possible to have the powershell curl output only the content part pointed out by the red rectangle above?

I tried findstr which is not that satisfying.

enter image description here

JJJohn
  • 915
  • 8
  • 26
  • Voting to migrate the question to SO so it can be closed as a duplicate to the linked question. – Gerald Schneider Mar 09 '22 at 09:41
  • 1
    `curl http://127.0.0.1:8080/ -UseBasicParsing | Select-Object -ExpandProperty Content`? – JosefZ Mar 09 '22 at 14:27
  • @JosefZ Thank you. That's exactly what I'm looking for! – JJJohn Mar 09 '22 at 15:02
  • 2
    Possible duplicate of [How to get an object's property's value by property name?](https://stackoverflow.com/questions/14406315/how-to-get-an-objects-propertys-value-by-property-name) (per @GeraldSchneider's comment) – pppery Mar 10 '22 at 00:11
  • 2
    just `(curl http://127.0.0.1:8080/ -UseBasicParsing).Content` – phuclv Mar 10 '22 at 03:26

0 Answers0