Developer saved an API endpoint with URL with a tab/space in the end via cut and paste into the field. When the user tried to use the Invoke-RestMethod, this endpoint failed with a 404 error.
Can whitespace character for URL field in API be trimmed on save to prevent this error?
Copying URL
Invoke-RestMethod https://powershell-universal/rest/withtab
Looking at endpoints.ps1
New-PSUEndpoint -Url "/rest/withtab " -Endpoint {
“hello world.”
}