Initializervapor 4.114.1Vapor
init(scheme:host:port:path:query:fragment:)
URI.swift:76init(scheme: String?, host: String? = nil, port: Int? = nil, path: String, query: String? = nil, fragment: String? = nil)
init(scheme: String?, host: String? = nil, port: Int? = nil, path: String, query: String? = nil, fragment: String? = nil)
s5Vapor3URIV6scheme4host4port4path5query8fragmentACSSSg_AJSiSgSSA2Jtcfc
What are these?8LCRR
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
struct URI
A type for constructing and manipulating (most) Uniform Resource Indicators.
@frozen struct String
A Unicode string value that is a collection of characters.
@frozen struct Int
A signed integer value type.
init(from decoder: any Decoder) throws
init(scheme: Scheme = .init(), host: String? = nil, port: Int? = nil, path: String, query: String? = nil, fragment: String? = nil)
init(scheme: Scheme = .init(), userinfo: String?, host: String? = nil, port: Int? = nil, path: String, query: String? = nil, fragment: String? = nil)
Construct a URI
from various subcomponents.
init(scheme: String?, userinfo: String?, host: String? = nil, port: Int? = nil, path: String, query: String? = nil, fragment: String? = nil)
init(string: String = "/")
Create a URI
by parsing a given string according to the semantics of RFC 3986.
init(stringLiteral value: String)
var description: String { get }
var fragment: String? { get set }
var host: String? { get set }
var path: String { get set }
var port: Int? { get set }
var query: String? { get set }
var scheme: String? { get set }
var string: String { get }
var userinfo: String? { get set }
func encode(to encoder: any Encoder) throws
struct Scheme
A URI scheme, as defined by RFC 3986 § 3.1 and [RFC 7595].