Answer the question
In order to leave comments, you need to log in
Alamofire and Get request. How to implement correctly?
Friends tell me
1. There is such a request, in response to which I receive JSON
https://www.yandexxx.com/graphql/query/?query_hash=60b755363b5c2301113477777&variables={%22reel_ids%22:[%227542607987%22],%22tag_names%22:[],%22location_ids%22:[],%22highlight_reel_ids%22:[],%22precomposed_overlay%22:false,%22show_header_follow_button%22:true}
guard var url = URLComponents(string: str) else { return }
url.queryItems = [
URLQueryItem(name: "query_hash=", value: "\(queryHash)"),
URLQueryItem(name: "\(str2)variables", value: "{"),
....]
url.percentEncodedQuery = url.percentEncodedQuery?.replacingOccurrences(of: "%3D=", with: "=")
url.percentEncodedQuery = url.percentEncodedQuery?.replacingOccurrences(of: "%2522", with: "%22")
{} []
everything crashes var urlString: String = "https://www.yandexxx.com"
urlString = urlString.appendingFormat("/graphql/query/?query_hash=" + "\(queryHash)")
urlString = urlString.appendingFormat("&variables={")
urlString = urlString.appendingFormat("%22reel_ids%22:[\(userId)],")
........")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question