Zillow Base

FREEMIUM
Por tvh81 | Actualizada לפני חודשיים | Data
Popularidad

9.3 / 10

Latencia

600ms

Nivel de servicio

100%

Health Check

N/A

Volver a todas las conversaciones

A server with the specified hostname could not be found.

Rapid account: Amourinetech
amourinetech
לפני 10 חודשים

I tried running your code sample in Swift.
I keep getting the following error via Xcode:

“A server with the specified hostname could not be found.”

Here’s my code:

func fetchData() async throws -> [Location] {
let url = URL(string: “https://zillow-base1.p.rapidapi.com/WebAPIs/zillow/locationSuggestions/v2?location=Brownsville%2C TX”)!
let headers = [
“X-RapidAPI-Key”: “1f7f2f561emsh5142da984f24635p19dcccjsn034500ecc809”,
“X-RapidAPI-Host”: “zillow-base1.p.rapidapi.com
]
var request = URLRequest(url: url, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let (data, _) = try await URLSession.shared.data(for: request)
let decoder = JSONDecoder()
let locations = try decoder.decode([Location].self, from: data)
return locations

}

Rapid account: Tvhaudev
tvhaudev Commented לפני 10 חודשים

Hi amourinetech,

I’m sorry for the delayed response.

https://zillow-base1.p.rapidapi.com/WebAPIs/zillow/locationSuggestions/v2?location=Brownsville%2C TX
zillow-base1.p.rapidapi.com
I have confirmed that the hostname information is still functioning properly. Could you please fix the path and check it again for me?

Regarding the code you provided, I don’t have a MAC machine here, so I haven’t been able to test that piece of code yet.
I hope you understand.

Únase a la conversación, añada un comentario a continuación:

Inicie sesió/Regístrese para publicar nuevos comentarios