【发布时间】:2016-11-08 19:30:25
【问题描述】:
我正在使用 Forecast.io 来获取天气。 api url 如下: https://api.forecast.io/forecast/abf7afb3c49204d542b14e8ba282a188/37.8267,-122.423
调用 API WeatherAPI.Factory.getmWeatherAPI().getWeather(48.8566,2.3522).enqueue(new Callback()
API url 中不需要名称来表示经度和纬度。
我正在尝试这个,但 Retrofit 似乎添加了特殊字符 - (见下面的屏幕)
@GET("forecast/")
Call<Weather> getWeather(
@Query("") Double longitude,
@Query("") Double latitude);
调用的 URL 是并导致 404
非常感谢您的帮助,
【问题讨论】:
标签: android api http-status-code-404 retrofit