URL

extension URL
  • Alias for port type

    Declaration

    Swift

    public typealias Port = Int
  • Returm true if scheme is http or https

    Declaration

    Swift

    public var isHttpOrHttps: Bool { get }
  • Return true only if scheme is https

    Declaration

    Swift

    public var isHttps: Bool { get }
  • Return true only if scheme is http

    Declaration

    Swift

    public var isHttp: Bool { get }
  • Return the default port for current scheme

    Declaration

    Swift

    public var defaultPort: Port? { get }
  • Return true if port is default port for url scheme

    Declaration

    Swift

    public var hasDefaultPort: Bool { get }
  • Dictionary of default ports by schemes

    Declaration

    Swift

    public static let defaultPorts: [String : Port]
  • Return true if scheme is a secure one (https, wss)

    Declaration

    Swift

    public var isSecure: Bool { get }
  • Return a new url from this one but change the scheme.

    Declaration

    Swift

    public func with(scheme: String) -> URL
  • Return a new url from this one but change the host.

    Declaration

    Swift

    public func with(host: String) -> URL

url with information from settings

  • Default scheme for server url.

    Declaration

    Swift

    public static var defaultScheme: String { get }
  • Return a new url with defaultScheme.

    Declaration

    Swift

    public func withDefaultScheme() -> URL
  • localhost url with defined port by settings.

    Declaration

    Swift

    public static var qmobileLocalhost: URL { get }
  • Undocumented

    Declaration

    Swift

    public static var qmobile: URL { get }
  • Return the url defined to reach the servers.

    Declaration

    Swift

    public static var qmobileURLs: [URL]? { get }