mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-21 01:39:51 +00:00
Migrate all HTTP calls to use OkHttp rather than URLConnection.
This commit is contained in:
parent
4c64746e75
commit
74d552d187
16 changed files with 2135 additions and 2062 deletions
|
@ -54,6 +54,8 @@ import de.schildbach.pte.dto.StationDepartures;
|
|||
import de.schildbach.pte.dto.Style;
|
||||
import de.schildbach.pte.util.ParserUtils;
|
||||
|
||||
import okhttp3.HttpUrl;
|
||||
|
||||
/**
|
||||
* @author Andreas Schildbach
|
||||
*/
|
||||
|
@ -171,7 +173,7 @@ public class InvgProvider extends AbstractHafasProvider {
|
|||
// scrape page
|
||||
final StringBuilder uri = new StringBuilder(stationBoardEndpoint);
|
||||
appendXmlStationBoardParameters(uri, time, stationId, maxDepartures, false, null);
|
||||
final CharSequence page = httpClient.get(uri.toString());
|
||||
final CharSequence page = httpClient.get(HttpUrl.parse(uri.toString()));
|
||||
|
||||
// parse page
|
||||
final Matcher mHeadCoarse = P_DEPARTURES_HEAD_COARSE.matcher(page);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue