init(_:)

Create a request method from a string. Returns nil if the string contains invalid characters defined in RFC 9110.

HTTPRequest.swift:35
init?(_ method: String)

Parameters

method

The method string. It can be accessed from the rawValue property.

https://www.rfc-editor.org/rfc/rfc9110.html#name-methods