- Make a web request to the educative website:
Invoke-WebRequest -URI https://www.educative.io/
- Get all links on a webpage:
(Invoke-WebRequest -Uri "https://www.educative.io/").Links.Href
- Submit form-data:
$Form = @{
firstName = 'Bruce'
lastName = 'Wayne'
email = '[email protected]'
occupation = 'Superhero'
}
$Result = Invoke-WebRequest -Uri [sample-url] -Method Post -Form $Form
Similarly, you can run more curl
commands using Invoke-WebRequest
.
Read more about Invoke-WebRequest
here.