使用自定义Header传递身份验证令牌。
代码示例:
OkHttpClient client = new OkHttpClient();
String token = "your_custom_token";
Request request = new Request.Builder()
.url("https://your_api_endpoint")
.header("Authorization", "Bearer " + token)
.build();
Response response = client.newCall(request).execute();