2 ms·
Well, you use Invoke-RestMethod for JSON/XML stuff. Or decide yourself for Invoke-WebRequest to pipe it with whatever the data: ConvertFrom-{JSON,XML,CSV} Wit
by jve 7y ago
Well, you use Invoke-RestMethod for JSON/XML stuff.
Or decide yourself for Invoke-WebRequest to pipe it with whatever the data: ConvertFrom-{JSON,XML,CSV}
With Invoke-WebRequest you get back headers, raw response, etc - and you get to decide whats next. With the RestMethod - just the content as an object.