コード例 #1
0
 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 (!UnityWebRequest.IsHeaderNameLegal(name))
     {
         throw new ArgumentException("Cannot set Request Header " + name + " - name contains illegal characters or is not user-overridable");
     }
     if (!UnityWebRequest.IsHeaderValueLegal(value))
     {
         throw new ArgumentException("Cannot set Request Header - value contains illegal characters");
     }
     this.InternalSetRequestHeader(name, value);
 }