【发布时间】:2018-09-28 19:49:34
【问题描述】:
我正在尝试将 token 添加到 HTTP @POST 中的 url 字符串,但我得到了
属性值必须是常量错误
。我想不通为什么?我正在使用改造 2。
**
public interface API {
static final String url = ("/secure/frrest/oauth2/token/"+ Prefs.getSmartPassAccessToken(App.getContext()) + "?_action=revokeTokens");
@FormUrlEncoded
@POST(url)
void smartpassnonpersistentlogout(@Header("Content-Type") String content_type,
@Field("client_id") String client_id,
Callback<SmartPassResponse> callback);
**
【问题讨论】:
-
请在提问前进行一些搜索。这个已经回答了,例如这里:stackoverflow.com/questions/41720327/… 或这里:stackoverflow.com/questions/39157370/…