mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-25 01:14:36 +08:00
#395 修复获取小程序二维码data format error的问题
This commit is contained in:
parent
7b64b6b4a0
commit
0714cbe8e2
@ -8,10 +8,12 @@ import cn.binarywang.wx.miniapp.util.json.WxMaGsonBuilder;
|
||||
* @author Element
|
||||
*/
|
||||
public abstract class AbstractWxMaQrcodeWrapper {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public String toJson() {
|
||||
return WxMaGsonBuilder.create().toJson(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.toJson();
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class QrCodeRequestExecutor implements RequestExecutor<File, AbstractWxMa
|
||||
RequestConfig.custom().setProxy(requestHttp.getRequestHttpProxy()).build()
|
||||
);
|
||||
}
|
||||
httpPost.setEntity(new StringEntity(ticket.toString()));
|
||||
httpPost.setEntity(new StringEntity(ticket.toJson()));
|
||||
|
||||
try (CloseableHttpResponse response = requestHttp.getRequestHttpClient().execute(httpPost);
|
||||
InputStream inputStream = InputStreamResponseHandler.INSTANCE.handleResponse(response);) {
|
||||
|
Loading…
Reference in New Issue
Block a user