The Web

The Web: APIs as Objects: `Invoke-RestMethod`, Pages and Downloads: `Invoke-WebRequest`.

Updated

  1. APIs as Objects: `Invoke-RestMethod` (Journeyman): Invoke-RestMethod asks a web API for data and turns its JSON answer into objects, so a weather forecast arrives ready for Select-Object, Where-Object and the rest of the pipeline, and query parameters after a ? in the address ask for exactly what you want.
  2. Pages and Downloads: `Invoke-WebRequest` (Journeyman): Invoke-WebRequest gives you the whole answer from a web address, not only its data, so you can read the status code that says whether a page is there, read the headers that describe it, and save what it sends as a file with -OutFile.