BasicAuthenticationRequired event removes Content-Type header from Request. #4841
Unanswered
rpriest1260
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am seeing an issue and wondering if this is a bug in the WebView2 code. Essentially, after the BasicAuthenticationRequested event fires and the credentials are supplied, the WebView2 code appears to remove the Content-Type header (if supplied), from the initial POST request sent. The webservice I intend to use needs that header, so this breaks the request. Should I file a bug for it? Has anyone else run into this?
Just to check I created the same POST request with a HttpWebRequest, object, and that does not have this problem - it does not strip the Content-Type header after the 407-Proxy Auth Required has been satisfied with the supplied credentials.
I am using:
My POST request is done as follows:
And my credentials are supplied using the BasicAuthenticationRequired even, like so
And as mentioned, above, A basic HttpWebRequest, does not have this issue. If you would like to see what code I used to compare to WebView2, it looks like this:
if any other information or sample code is needed, please just ask and I will supply.
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions