I have just found out that if I use RequestType.UnityWebRequest then I can see the traffic through Charles proxy without problem (I have setup SSL as well, so I can see everything in clear) BUT if I switch to RequestType.HttpWebRequest then all of a sudden I don't see traffic from Unity to PlayFab. By looking at the code, I see that in
PlayFabWebRequest, method Post(), lines 303 and 313 the HttpRequest.Proxy variable is set to null:
reqContainer.HttpRequest.Proxy = null;
this probably overrides the system proxy, as if I comment those lines out I see the requests in Charles without problems.
(In case you ask it: I wish I could use the UnityWebRequest BUT this does not actually use the RequestTimeout at all, that's why we switched to HttpWebRequest)
I have two questions:
1) Why is this value set twice? Sounds like a "bug"
2) Why is Proxy set to null in the first place? Is it safe to not set it to null and let it use the default system proxy settings?
All I see is a comment stating:
// Prevents hitting a proxy if no proxy is available. TODO: Add support for proxy's.
but it's weird as this basically prevents any proxy to be used...