Resolved: iOS Swift API URLQueryitem

In this post, we will see how to resolve iOS Swift API URLQueryitem


I am getting the url as : urlRequest===== The actual url :
I need to remove the ?id= How to remove this characters from this. Please help.
Thanks in advance.

Best Answer:

URLQueryItem adds the question mark which represents the query separator.
This REST URL doesn’t use URL query so URLQueryItem is not needed at all. Add the user ID with String Interpolation.
URLRequest is not needed either, GET is the default and you don’t use a special configuration

If you have better answer, please add a comment about this, thank you!