下面的代码负责发送获取用户信息的 POST 请求,
想问一下是不是应该加一个 Header:
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
。
|
protected String oauthClientInfoPost(OauthClient oauthClient, String redirectUri, String accessToken, |
|
String refreshToken) throws Exception { |
|
String address = oauthClient.getInfoAddress(); |
|
String parameter = fillInfoParameter(oauthClient.getInfoParameter(), oauthClient, redirectUri, accessToken, |
|
refreshToken); |
|
logger.debug("info post address:{}.", address); |
|
logger.debug("info post parameter:{}.", parameter); |
|
String str = HttpConnection.postAsString(address, null, parameter); |
|
return str; |
|
} |