Force Capture HTTP response and Status Code as Normal, Non-Error Output
ziabytes opened this issue · 3 comments
Right now when we get HTTP errors, they are, somewhat saved as error in Powershell that we can just look up by checking the error or "catching" the error
For a lot of monitoring scenarios though, exact output is very useful.
Having the functionality via say, a switch, to tell the Invoke-Webrequest call to tell it to just act as nothing is wrong with the output/status/code, can be extremely useful in cutting the clutter in scripting API monitoring, and focusing more time on creating logic for the specific status codes, milliseconds, response body than dealing with try catching errors every time
I believe there was a -SkipHttpErrorCheck switch added sometime during v6 to allow for those cases. If you're using v7 of PowerShell, this functionality will be available.
Thank you very much
I did not know it was already a thing
I have not yet used v7 as much for my API and web related scripting yet.