- Home /
Are double response headers supported in unity?
Server sends me back two Set-Cookie headers. However, when I debug all headers in unity only the last one is visible.
Is there a way to retrieve first Set-Cookie data?
Thanks
Answer by alankemp · Feb 12, 2016 at 10:47 AM
No, you cannot retrieve it. The data has already been lost by the time it gets to your code. reponseHeaders is a key value dictionary, only one value (the cookie data) can exist for each key ("Set-Cookie").
@alankemp Any workarounds? would System.Net.Webrequest be a potential solution?
What is the logical reasoning behind storing it in dictionary from unity side?
This has been a bug for a long time. I posted a feature request some time ago. As someone said in a comment, it might be possible to extract the response headers with reflection from the internal field.