Web requests
A background in web requests is valuable before delving into interfaces that run over the top of the Hypertext Transfer Protocol (HTTP).
PowerShell can use Invoke-WebRequest
to send HTTP requests. For example, the following command will return the response to a GET
request for the Hey, Scripting Guy blog:
Invoke-WebRequest https://blogs.technet.microsoft.com/heyscriptingguy/
Parsing requires Internet Explorer
In Windows PowerShell, UseBasicParsing
was an important parameter. Its use was mandatory when working on Core installations of Windows Server as Internet Explorer was not installed. It was also often used to improve the performance of a command where parsing was not actually required.
In PowerShell Core, all requests use basic parsing. The parameter is deprecated and present to support backward compatibility only. The parameter does not affect the output of the command.
A web request has an HTTP method. A request might...