Vapor Documentation

Structure URI.​Scheme

public struct Scheme: ExpressibleByStringInterpolation  

A URI's scheme.

%173 URI.Scheme URI.Scheme ExpressibleByStringInterpolation ExpressibleByStringInterpolation URI.Scheme->ExpressibleByStringInterpolation

Member Of

URI

Conforms To

ExpressibleByStringInterpolation

Initializers

init(string​Literal:​)

public init(stringLiteral value: String)  

init(_:​)

public init(_ value: String? = nil)  

Properties

http

public static let http: Self = "http"

HTTP

https

public static let https: Self = "https"

HTTPS

http​Unix​Domain​Socket

public static let httpUnixDomainSocket: Self = "http+unix"

HTTP over Unix Domain Socket Paths. The socket path should be encoded as the host in the URI, making sure to encode any special characters:

host.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)

Do note that URI's initializer will encode the host in this way if you use init(scheme:host:port:path:query:fragment:).

https​Unix​Domain​Socket

public static let httpsUnixDomainSocket: Self = "https+unix"

HTTPS over Unix Domain Socket Paths. The socket path should be encoded as the host in the URI, making sure to encode any special characters:

host.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)

Do note that URI's initializer will encode the host in this way if you use init(scheme:host:port:path:query:fragment:).

value

public let value: String?