I'm designing a simple SugarTargetType to download files from arbitrary urls:
/* ... */
var baseURL: URL {
switch self {
case .download(let url): return url
}
}
var route: Route {
return .get("")
}
/* ... */
Moya's previous behaviour was to always append the path to the baseURL. They changed this behaviour in Moya 8.0.4 (see: https://github.com/Moya/Moya/pull/1053) to avoid appending an extraneous / at the end of the url.
I'm designing a simple
SugarTargetType
to download files from arbitrary urls:Moya's previous behaviour was to always append the
path
to thebaseURL
. They changed this behaviour in Moya 8.0.4 (see: https://github.com/Moya/Moya/pull/1053) to avoid appending an extraneous/
at the end of the url.It seems to me that the code can easily be modified to respect the new Moya behaviour. The change would happen at https://github.com/devxoul/MoyaSugar/blob/master/Sources/SugarTargetType.swift#L56
would become
I would do a pull request but I am unable to compile the project on my computer.