[英]How to make GET request with string parameter in Swift? [closed]
I have an URL and I want to make a simple GET-request with Swift, but I also need to send parameter to this request.我有一个 URL,我想用 Swift 发出一个简单的 GET 请求,但我还需要向这个请求发送参数。 It seems like this:
看起来像这样:
https://api.teleport.org/api/countries/iso_alpha2%3AUS/salaries/
where, for example, iso_alpha2:US
is a parameter?例如,
iso_alpha2:US
在哪里是参数?
I use URLSession and can not understand, how to parse Json in this case?我使用 URLSession 并且无法理解,在这种情况下如何解析 Json?
Sorry for stupid question and thank you!对不起,愚蠢的问题,谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.