The API service I was using was blocked in some regions, so now I need to send https requests through a proxy server. Can someone send a link to a guide or something?
This is my code:
let headers = ["x-rapidapi-key": "<my key>","x-rapidapi-host": "weatherapi-com.p.rapidapi.com"]let request = NSMutableURLRequest(url: NSURL(string: "https://weatherapi-com.p.rapidapi.com/forecast.json?q=\(latitude)%2C%20\(longitude)&days=\(daylyScrollLength)&lang=ru")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)request.httpMethod = "GET"request.allHTTPHeaderFields = headerslet session = URLSession.sharedlet dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if let data, let weather = try? JSONDecoder().decode(WeatherForecastData.Data.self, from: data){ weatherData(weather) }})dataTask.resume()