3 ms·
No it wont, server need to return JSON format itself. Your example doesn't work. It needs to be: irm ipinfo.io/json Your other example can be get like th
by majkinetor 6y ago
No it wont, server need to return JSON format itself.
Your example doesn't work. It needs to be:
irm ipinfo.io/json
Your other example can be get like this:
irm http://checkip.dyndns.org | % HTML | % body
- JimDabell 6y agoIt will work. The server will return JSON. The URL http://ipinfo.io/ http://ipinfo.io/ returns HTML if the Accept header indicates that you want HTML, and JSON if there is no header, a wildcard header, or a header that requests JSON. As far as I can see, irm doesn’t add an Accept header, so the command jodrellblank provided will fetch JSON and work correctly.
- majkinetor 6y agoDoesnt work on Windows 10 using latest pwsh
- jodrellblank 6y agoWorks on Windows 10 using Windows PowerShell. In Pwsh it does seem to need /json