UnityWebRequest.SetRequestHeader is not working in non development mode on Android

Hi,

I have an android app with the following

post.SetRequestHeader("Authorization", authorizationHeader);

Which works perfectly when I build with ‘Development Build’ option, but the header is not set when I run the same exact code on device with ‘Development Build’ off.

Any help is greatly appreciated.

The following code also runs with development build option on, but doesn’t work with the option off.

MethodInfo dynMethod = post.GetType().GetMethod("InternalSetRequestHeader", BindingFlags.NonPublic | BindingFlags.Instance);
                    dynMethod.Invoke(post, new object[] { "Authorization", authorizationHeader });