URLComponents

extension URLComponents: URLConvertible
  • Returns a URL if url is not nil, otherwise throws an Error.

    Throws

    An AFError.invalidURL if url is nil.

    Declaration

    Swift

    public func asURL() throws -> URL

    Return Value

    A URL or throws an AFError.