In the function Get-Data() a variable $type is used but not declaired. I think a line should be added: `$Type = "application/json"`