Created
August 19, 2019 21:14
-
-
Save steviecoaster/0aa95ba792a8067c7db329b9b398fb20 to your computer and use it in GitHub Desktop.
Because dad jokes are always fun.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-DadJoke { | |
| [cmdletBinding()] | |
| Param() | |
| process { | |
| $header = @{ | |
| Accept = "application/json" | |
| } | |
| $joke = Invoke-RestMethod -Uri "https://icanhazdadjoke.com/" -Method Get -Headers $header | |
| $joke.joke | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment