[The 'User-Agent' headermust be modifiedusing the appropriateproperty or method.Parameter name: name,The 'User-Agent' headermust be modifiedusing the appropriateproperty</
WARNING: Remote Server Response: The 'Content-Type' headermust be modifiedusing the appropriatepropertyASCII.GetBytes("$($Username):$Password")) "Authorization" = $basicAuth
.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/4.0");
但是我得到了一个例外:System.ArgumentException: This headermust be modifiedusing the appropriateproperty。
must be modifiedusing the appropriateproperty or method.Имя параметра: name --->
System.ArgumentException: The 'User-Agent' headermust be modifiedusing the appropriateproperty</em
) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36");using(var s = webRequest.GetResponse().GetResponseStream()) using (var sr = new StreamReader(s ??我得到的错误是:System.ArgumentException: 'The 'User-Agen
myRequest.Headers.Add("Range", $"dli-depth={depth}"); ...I获取此异常: System.ArgumentException: 'The 'Range' headermust be modifiedusing the appropriateproperty or method.如何在.NET中添加这个(也许是非标准的) Range header
$cred -Method Get -Headers @{"Accept"="application/xml"}
但是,我得到了与标题相关的以下错误:Invoke-RestMethod : This headermust be modifiedusing the appropriateproperty or method.
我决定设置If-Modified-Since,因为如果网站没有改变,我不想再得到它:c.Headers[HttpRequestHeader.IfModifiedSince但是当我运行这个程序时,我得到了一个带有文本的WebException:
The 'If-Modified-Since' headermust be modifiedusing the appropriateproper
头设置缓存-控制"max-age=0,public"RewriteEngine On <FilesMatch“(HTM2000js\css)$”> FileETag None Headerunset ETag Header set Cache-Control "max-age=0,no-cache,no-,必须重新验证“Header set Pragma”no cache“报头过期”“