-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Description
Background
I am responding my client request with 401 and sending back respond header with WWW-Authenticate: basic realm="apps" by following https://tools.ietf.org/html/rfc7235#section-4.1.
I can test it using postman. But I cannot use invoke-RestMethod because it does not return anything while 401.
Steps to reproduce
Invoke-RestMethod -Method Get -uri http://www.bing.comcomcomc -ResponseHeadersVariable aa
$aa # it's empty
Expected behavior
headers should be displayed even if server response with error code.
Actual behavior
headers are empty if server responses with 401.
Environment data
6.1
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module