alexander-albers / tripkit

Swift library for querying data from public transport providers.
MIT License
78 stars 8 forks source link

VRS: VrsProvider cache logic causes problems on queryJourneyDetail(context: ) request #79

Closed cseh17 closed 1 year ago

cseh17 commented 1 year ago

VrsProvider apparently has a caching logic that decides whenever a specific request goes against API_BASE or API_BASE_CACHE. From what I observed this works fine unless a queryJourneyDetail() request is made. In this case all the request that go against API_BASE_CACHE fail with a StatusCode of 421.

I also observed that when the request is redirected towards API_BASE_CACHE the request URI is also wrong (if compared to the ones that go agains API_BASE).

A fix is needed in order to be able to query the journey details reliably.

alexander-albers commented 1 year ago

There is no caching happening in VrsProvider, that's just what the endpoint is called. It seems like now all requests need to go to the API_BASE endpoint. Will push a fix, thanks for letting me know.