共用方式為


CorsPolicyBuilder.WithMethods(String[]) 方法

定義

將指定的 methods 加入至原則。

public:
 Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicyBuilder ^ WithMethods(... cli::array <System::String ^> ^ methods);
public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder WithMethods (params string[] methods);
member this.WithMethods : string[] -> Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder
Public Function WithMethods (ParamArray methods As String()) As CorsPolicyBuilder

參數

methods
String[]

需要新增至原則的方法。

傳回

目前的原則產生器。

適用於