コード例 #1
0
        private static bool TryGetWebHeaderValue(UnityWebRequest wr, string headerKey, out string headerValue)
        {
#if UNITY_5_4_OR_NEWER
            headerValue = wr.GetResponseHeader(headerKey);
            return(string.IsNullOrEmpty(headerValue));
#else
            if (wr.responseHeaders == null)
            {
                headerValue = string.Empty; return(false);
            }
            return(wr.responseHeaders.TryGetValue(headerKey, out headerValue));
#endif
        }