我想用 Retrofit2,
我想把 Token加到我的 Header中,像这样:
Authorization: Bearer  Token
but the code below doesn't work:
public interface APIService {
@Headers({"Authorization", "Bearer "+ token})
@GET("api/Profiles/GetProfile?id={id}")
Call<UserProfile> getUser(@Path("id") String id);
}
My server is asp.net webApi. Please help what should I do?
 
                                
                             
                                
                             
                                
                             
                                
                             
                                
                            