Replies: 1 comment 1 reply
-
Hi @mergesort, it's not that the query params in your URL are ordered, it's that your case lookupID(source: String, success: String, cancel: String, error: String) This is a static Swift symbol and it forces you to parse However, the order of the query params in the URL does not matter. Under the hood we just use |
Beta Was this translation helpful? Give feedback.
-
I'm currently implementing a router where people will be able to use x-callback-url to communicate with my app.
The code I have looks approximately like this, where if a user provides the
x-source
,x-success
,x-cancel
, andx-error
parameters a user will be prompted to share their ID with the app which calls into this deeplink.Those parameters will be matched into this case, providing all of the parameters as a string. (Side question: Is there a parser that directly validates a String to put it into a
URL
?)I noticed that if I change the order of the parameters either in the router or the URL itself, such as by putting
x-error
first, thenx-error
will be parsed intolookupID
ssource
parameter. This is a bit unexpected, generally URLs don't their query parameters to be in order, so I figure I must be missing something.Would love to know if there's a way to accomplish this, and thank you so much for all of the help so far!
Beta Was this translation helpful? Give feedback.
All reactions