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[]

需要添加到策略的方法。

返回

当前策略生成器。

适用于