共用方式為


RequestBuilder.AddHeader(String, String) 方法

定義

將給定的標頭和值新增至要求或要求內容。

public:
 Microsoft::AspNetCore::TestHost::RequestBuilder ^ AddHeader(System::String ^ name, System::String ^ value);
public Microsoft.AspNetCore.TestHost.RequestBuilder AddHeader (string name, string value);
member this.AddHeader : string * string -> Microsoft.AspNetCore.TestHost.RequestBuilder
Public Function AddHeader (name As String, value As String) As RequestBuilder

參數

name
String
value
String

傳回

RequestBuilder 用於鏈結。

適用於