最后,我以这种方式添加了标题:
@Override public Response intercept(Interceptor.Chain chain) throws IOException { Request request = chain.request(); Request newRequest; newRequest = request.newBuilder() .addHeader(HeadersContract.HEADER_AUTHONRIZATION, O_AUTH_AUTHENTICATION) .addHeader(HeadersContract.HEADER_X_CLIENT_ID, CLIENT_ID) .build(); return chain.proceed(newRequest); }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)