HttpMethod.Parse(ReadOnlySpan<Char>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將提供的 method 資料解析成一個 HttpMethod 實例。
public:
static System::Net::Http::HttpMethod ^ Parse(ReadOnlySpan<char> method);
public static System.Net.Http.HttpMethod Parse(ReadOnlySpan<char> method);
static member Parse : ReadOnlySpan<char> -> System.Net.Http.HttpMethod
Public Shared Function Parse (method As ReadOnlySpan(Of Char)) As HttpMethod
參數
- method
- ReadOnlySpan<Char>
解析的方法。
傳回
HttpMethod提供的method實例。
備註
此方法可能會回傳已知方法的單例實例;例如,若指定為「GET」,則可能回傳 Get 。 解析方式不區分大小寫,因此若指定「get」,解析也可能回傳 Get 。 對於未知方法,會回傳一個新 HttpMethod 實例,驗證方式與 HttpMethod(String) 建構子相同。