udacity/ud843_DidYouFeelIt

API redirecting to HTTPS

Opened this issue · 1 comments

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.

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