Dela via


CorsPolicyBuilder.WithMethods(String[]) Method

Definition

Adds the specified methods to the policy.

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

Parameters

methods
String[]

The methods which need to be added to the policy.

Returns

The current policy builder.

Applies to