opacclient icon indicating copy to clipboard operation
opacclient copied to clipboard

Switch to okhttp

Open johan12345 opened this issue 8 years ago • 2 comments

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

johan12345 avatar Jan 05 '17 11:01 johan12345

Do we know that we won't require the same SNI workarounds with OkHttp on older Android versions?

raphaelm avatar Jan 05 '17 11:01 raphaelm

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

johan12345 avatar Jan 05 '17 11:01 johan12345