ソースコード
public static void SetBasicAuth ( this UnityWebRequest request, string username, string password ) { var s = $"{username}:{password}"; var encoding = Encoding.GetEncoding( "ISO-8859-1" ); var inArray = encoding.GetBytes( s ); var basicAuth = Convert.ToBase64String( inArray ); var authorization = "Basic " + basicAuth; request.SetRequestHeader( "AUTHORIZATION", authorization ); }