I want to remove "User-Agent" property from my post httprequest.
I'm using okhttpclient.
Can anyone help me with snippet of code?
This will remove it for any request the client sends.
OkHttpClient client = new OkHttpClient.Builder()
.addNetworkInterceptor(chain -> chain.proceed(chain.request().newBuilder()
.removeHeader("user-agent")
.build()))
.build();