【问题标题】:Receive json respone instead of x-www-form-urlencoded接收 json 响应而不是 x-www-form-urlencoded
【发布时间】:2015-04-25 15:27:39
【问题描述】:

我正在尝试为我的应用程序配置 webhook,一切正常,但是当我为打开邮件调用 post 方法时,我得到的数据类型为 x-www-form-urlencoded 但我想接收 json .我该怎么做?我应该更改代码中的某些内容吗?或在mailgun网站的管理面板中?

当我更改配置以发送电子邮件时:

webResource.type(MediaType.APPLICATION_FORM_URLENCODED).post(ClientResponse.class, formData);

到:

webResource.type(MediaType.APPLICATION_JSON).post(ClientResponse.class, formData);

那我就收不到邮件了。

【问题讨论】:

    标签: java json webhooks mailgun


    【解决方案1】:

    很遗憾,您无法配置 mailgun webhook 的内容类型——您必须接受 x-www-form-urlencoded 格式。

    【讨论】:

      猜你喜欢
      • 2023-03-21
      • 2017-11-09
      • 2018-06-11
      • 2015-08-16
      • 2017-09-11
      • 2011-04-29
      • 2014-05-19
      • 2019-01-03
      相关资源
      最近更新 更多