google / cronet-transport-for-okhttp

This package allows OkHttp and Retrofit users to use Cronet as their transport layer, benefiting from features like QUIC/HTTP3 support or connection migration.
Apache License 2.0
427 stars 31 forks source link

Redirected URL #10

Closed alexeyr15 closed 1 year ago

alexeyr15 commented 1 year ago

Hello,

Is there a way to get a redirected URL from OkHttp's Response object?

Thanks

Danstahrg commented 1 year ago

Hi Alexey,

OkHttp uses priorResponse for that but we don't populate the field (https://github.com/google/cronet-transport-for-okhttp#common-incompatibilities). Can you share a bit more about your use case to prioritize the feature request?

alexeyr15 commented 1 year ago

It is HLS stream downloader. The app downloads a manifest file first, then segment files. When composing URLs for segment files, the app should know the final redirected URL used while downloading a manifest file.