收藏
回答

调用微信公众号创建卡券接口,一直报data is not utf8

我设置了编码

 URL realUrl = new URL(url);
 HttpURLConnection conn = (HttpURLConnection) realUrl.openConnection();
conn.setRequestMethod("POST");
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches(false); 
conn.setRequestProperty("Connection", "Keep-Alive");
conn.setRequestProperty("Charset", "UTF-8");

但是接口一直返回,我使用微信接口调试工具和postman测试都可以,Java代码调用就不行

{"errcode":47001,"errmsg":"data format error hint: [6i1hNA08955675] d
ata is not utf8"}

回答关注问题邀请回答
收藏

1 个回答

  • 疯狂的小辣椒
    疯狂的小辣椒
    2019-05-31

    你好,支付、卡券相关的问题请移步至微信支付专区提问,我们会有对应同学来处理,此贴先隐藏,请重新发帖咨询。

    2019-05-31
    有用 1
    回复
登录 后发表内容