Skip to content

QueryParam's order #119

@farzadshbfn

Description

@farzadshbfn

I know this is really stupid, but some apps, do not support QueryParameters like they should, and only support QueryItems in custom order. (like Maps.Me)

Any suggestions on how to fix this problem?
I was trying to add:

enum Query {
    case parameters([String:String])
    case items([URLQueryItem])

    var queryItems: [URLQueryItem] {
        switch self {
            case .parameters(let params): return params.map { URLQueryItem(name: $0, value: $1) }
            case .items(let queryItems): return queryItems
        }
    }
}

And use Query as an input, But since Path's queryParameters is variable and public, it'll definitely break backward compatibility.
Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions