Product: PowerShell Universal
Version: 4.2.21
I am playing around with monitoring our APIs using a standard monitoring system.
To test this i created a new API, and inserted this code:
New-PSUApiResponse -StatusCode 500
When i then executed “curl -I http://server:5000/api/v1/status”, i got a HTTP 200 response:
HTTP/1.1 200 OK
Date: Fri, 31 May 2024 12:09:06 GMT
Server: Kestrel
How can i change the HTTP response code, that will be returned to the client?