weixin.popular.api.CallbackipAPI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of weixin-popular Show documentation
Show all versions of weixin-popular Show documentation
The weixin-popular is a JAVA SDK for weixin. Weixin web url is https://mp.weixin.qq.com.
package weixin.popular.api;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.methods.RequestBuilder;
import weixin.popular.bean.callbackip.Callbackip;
import weixin.popular.client.LocalHttpClient;
/**
* 获取微信服务器IP地址
* @author LiYi
*
*/
public class CallbackipAPI extends BaseAPI{
/**
* 获取微信服务器IP地址
* @param access_token access_token
* @return Callbackip
*/
public static Callbackip getcallbackip(String access_token){
HttpUriRequest httpUriRequest = RequestBuilder.get()
.setUri(BASE_URI + "/cgi-bin/getcallbackip")
.addParameter(PARAM_ACCESS_TOKEN,API.accessToken(access_token))
.build();
return LocalHttpClient.executeJsonResult(httpUriRequest,Callbackip.class);
}
}