opacclient
opacclient copied to clipboard
Switch to okhttp
We are currently using Apache HTTPClient for all HTTP requests done from libopac. This has some disadvantages:
- An old version of it is bundled with older Android versions - even though we use a newer version, we need to add things like
useLibrary 'org.apache.http.legacy'
to make libopac work on Android - It requires workarounds to support SNI on older Android versions
- ...
We are planning to gradually switch all APIs to use OkHttp instead. This requires a large amount of testing, especially for the library systems that require peculiar types of HTTP requests.
Systems already migrated to OkHttp:
- [x] Adis
- [x] BiBer
- [x] Bibliotheca
- [ ] Heidi
- [x] iOPAC
- [x] Littera
- [x] Open
- [x] PICA
- [ ] Primo
- [x] SISIS
- [ ] SRU
- [x] TouchPoint
- [x] VuFind
- [x] WebOpacNet
- [x] WinBiap
- [x] Zones
Do we know that we won't require the same SNI workarounds with OkHttp on older Android versions?
OkHttp says it supports SNI on Android 2.3 and above: https://github.com/square/okhttp/blob/master/okhttp/src/main/java/okhttp3/internal/platform/Platform.java#L40