parley-messaging / android-library

Parley Android app library
MIT License
3 stars 3 forks source link

Add option to set okhttp interceptor to network client #37

Closed mennovogel closed 2 months ago

mennovogel commented 2 months ago

For Parley to be able to connect to the backend api's hosted on our servers, we need to add some extra headers. Setting pre-configured headers using the Map<String, String> headers parameter doesn't work for us, because our headers need to be created dynamically.

This change would allow is to add the custom headers we need.

I considered adding a new ParleyNetwork constructor, but this would require the client to add the OkHttp networking library (or Retrofit) to be abled to compile the project. That's why I've added a function instead.

Thanks,

Menno Vogel

alexkok commented 2 months ago

Thanks for the clear description @mennovogel!

Looks good to add 👍

alexkok commented 2 months ago

Released in 3.9.1 🚀