API redirecting to HTTPS
Opened this issue · 1 comments
crlsndrsjmnz commented
When I open the application I get the following error:
com.example.android.didyoufeelit E/Utils: Error response code: 301
That is caused by the API, which is returning Response Code 301 (Moved Permanently) on Utils:100, method makeHttpRequest
.
Full response is:
<title>301 Moved Permanently</title>Moved Permanently
The document has moved here.
rami-alloush commented
I just solved this by changing the url from http to https. So line 31 will be:
"https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&starttime=2016-01-01&endtime=2016-05-02&minfelt=50&minmagnitude=5";
Hope this helps