-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Description
Thank you for your great work!
I used line-bot-sdk version 8.6.0 and it is helpful.
There are two points i think we could improve for better configuration
- Add support for adding OkHttp3.Interceptor, instead of your own Interceptor one
https://github.com/line/line-bot-sdk-java/blob/master/clients/line-bot-client-base/src/main/java/com/linecorp/bot/client/base/ApiClientBuilder.java#L133-L139
Currently we use CurlInterceptor and with your given API there is no way to adapt current interceptor to HttpInterceptor
Suggestion code is simple as
public ApiClientBuilder<T> addInterceptor(Interceptor interceptor) {
this.additionalInterceptors.add(interceptor);
return this;
}
- Do not set
buildLoggingInterceptoras a default one.
Though we can configure the log level to filter out the log, but you may provide that interceptor as an optional so Developer can use it or not.
For example i just only want to log some header then I have to
- Disable that current logging interceptor
- Create my own interceptor to have same logging functionality
it is not so connivence
Thank you so much for your great work!
Yang-33