public void SetRequestHeader(string name, string value)
        {
            bool flag = string.IsNullOrEmpty(name);

            if (flag)
            {
                throw new ArgumentException("Cannot set a Request Header with a null or empty name");
            }
            bool flag2 = value == null;

            if (flag2)
            {
                throw new ArgumentException("Cannot set a Request header with a null");
            }
            bool flag3 = !this.isModifiable;

            if (flag3)
            {
                throw new InvalidOperationException("UnityWebRequest has already been sent and its request headers cannot be altered");
            }
            UnityWebRequest.UnityWebRequestError unityWebRequestError = this.InternalSetRequestHeader(name, value);
            bool flag4 = unityWebRequestError > UnityWebRequest.UnityWebRequestError.OK;

            if (flag4)
            {
                throw new InvalidOperationException(UnityWebRequest.GetWebErrorString(unityWebRequestError));
            }
        }
 private void InternalSetUrl(string url)
 {
     if (!this.isModifiable)
     {
         throw new InvalidOperationException("UnityWebRequest has already been sent and its URL cannot be altered");
     }
     UnityWebRequest.UnityWebRequestError unityWebRequestError = this.SetUrl(url);
     if (unityWebRequestError != UnityWebRequest.UnityWebRequestError.OK)
     {
         throw new InvalidOperationException(UnityWebRequest.GetWebErrorString(unityWebRequestError));
     }
 }
 internal void InternalSetCustomMethod(string customMethodName)
 {
     if (!this.isModifiable)
     {
         throw new InvalidOperationException("UnityWebRequest has already been sent and its request method can no longer be altered");
     }
     UnityWebRequest.UnityWebRequestError unityWebRequestError = this.SetCustomMethod(customMethodName);
     if (unityWebRequestError != UnityWebRequest.UnityWebRequestError.OK)
     {
         throw new InvalidOperationException(UnityWebRequest.GetWebErrorString(unityWebRequestError));
     }
 }
        internal void InternalSetMethod(UnityWebRequestMethod methodType)
        {
            if (!isModifiable)
            {
                throw new InvalidOperationException("UnityWebRequest has already been sent and its request method can no longer be altered");
            }

            UnityWebRequestError ret = SetMethod(methodType);

            if (ret != UnityWebRequestError.OK)
            {
                throw new InvalidOperationException(UnityWebRequest.GetWebErrorString(ret));
            }
        }
        internal void InternalSetMethod(UnityWebRequest.UnityWebRequestMethod methodType)
        {
            bool flag = !this.isModifiable;

            if (flag)
            {
                throw new InvalidOperationException("UnityWebRequest has already been sent and its request method can no longer be altered");
            }
            UnityWebRequest.UnityWebRequestError unityWebRequestError = this.SetMethod(methodType);
            bool flag2 = unityWebRequestError > UnityWebRequest.UnityWebRequestError.OK;

            if (flag2)
            {
                throw new InvalidOperationException(UnityWebRequest.GetWebErrorString(unityWebRequestError));
            }
        }
 public void SetRequestHeader(string name, string value)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw new ArgumentException("Cannot set a Request Header with a null or empty name");
     }
     if (value == null)
     {
         throw new ArgumentException("Cannot set a Request header with a null");
     }
     if (!this.isModifiable)
     {
         throw new InvalidOperationException("UnityWebRequest has already been sent and its request headers cannot be altered");
     }
     UnityWebRequest.UnityWebRequestError unityWebRequestError = this.InternalSetRequestHeader(name, value);
     if (unityWebRequestError != UnityWebRequest.UnityWebRequestError.OK)
     {
         throw new InvalidOperationException(UnityWebRequest.GetWebErrorString(unityWebRequestError));
     }
 }
        public void SetRequestHeader(string name, string value)
        {
            if (String.IsNullOrEmpty(name))
            {
                throw new ArgumentException("Cannot set a Request Header with a null or empty name");
            }

            // Only check for null here, as in general header value can be empty, i.e. Accept-Encoding can have empty value according spec.
            if (value == null)
            {
                throw new ArgumentException("Cannot set a Request header with a null");
            }
            if (!isModifiable)
            {
                throw new InvalidOperationException("UnityWebRequest has already been sent and its request headers cannot be altered");
            }

            UnityWebRequestError ret = InternalSetRequestHeader(name, value);

            if (ret != UnityWebRequestError.OK)
            {
                throw new InvalidOperationException(UnityWebRequest.GetWebErrorString(ret));
            }
        }