Closed wenubey closed 1 year ago
I also got this error on exception catching Error: Unable to resolve host "swapi.dev": No address associated with hostname
You might try one of the other mirrors until the certificate issue is resolved. https://www.swapi.tech/ http://swapi.py4e.com/
Than
You might try one of the other mirrors until the certificate issue is resolved. https://www.swapi.tech/ http://swapi.py4e.com/
Thanks a lot. This http://swapi.py4e.com/ is a similar one. The other you'll need to refactor a bit
I try to use http://swapi.py4e.com/ but it gives HTTP 404 error. When I check response postman, it is worked great but when I try to use in my android project I got 404 error message
interface StarWarsApi {
@GET("people/")
suspend fun getCharacters(@Query("page") page: Int): ListCharacterDto
@GET("planets/{id}/")
suspend fun getPlanet(@Path("id") id: Int): PlanetDto
@GET("species/{id}/")
suspend fun getSpecie(@Path("id") id: Int): SpecieDto
@GET("films/{id}/")
suspend fun getFilm(@Path("id") id: Int): FilmDto
@GET("vehicles/{id}/")
suspend fun getVehicle(@Path("id") id: Int): VehicleDto
@GET("starships/{id}/")
suspend fun getStarship(@Path("id") id: Int): StarshipDto
companion object {
const val BASE_URL = "https://swapi.py4e.com/api/"
}
}
const val BASE_URL = "https://swapi.py4e.com/api/" Not an https http://swapi.py4e.com/
I solve the problem using http://swapi.py4e.com/
Your connection is not private Attackers might be trying to steal your information from swapi.dev (for example, passwords, messages, or credit cards). Learn more NET::ERR_CERT_DATE_INVALID