【问题标题】:Zendesk Post ticket fails , 422|Unprocessable Entity in AndroidZendesk Post 票证失败,422|Android 中无法处理的实体
【发布时间】:2014-02-05 10:26:35
【问题描述】:

在我的应用程序中使用Zendesk API 与客户互动。最多 3 个月前,我们的支持团队收到了邮件(Zendeskticket)。但现在我们正在升级Zendesk API 2。 如下所示

https://<domain>.zendesk.com/api/v2/tickets.json

问题是只有老客户票得到了,但新用户/客户票没有得到。 我得到的连接响应代码是 422 - Unprocessable Entity

HttpURLConnection connection = client.open(new URL(encoded_url));
            connection.setRequestMethod("POST");
            if (null != contentType) connection.addRequestProperty("Content-type", "application/json");

            // Write the request.
            out = connection.getOutputStream();
            out.write(data.getBytes("UTF-8"));
            out.close();

            final int statusCode = connection.getResponseCode();
            if (statusCode >= HttpURLConnection.HTTP_BAD_REQUEST) {
                onComplete.execute(false, statusCode + "|" + connection.getResponseMessage() + "|" + encoded_url, "Error " + statusCode + " while retrieving data from " + encoded_url + "\nreason phrase: " + connection.getResponseMessage());
                return;
            }

            // Read the response.
            in = connection.getInputStream();
            byte[] response = readFully(in);

你能帮忙吗..

【问题讨论】:

标签: java android zendesk


【解决方案1】:

当 NULL 通过我的模型/poco 类传递到 Zendesk 时,我遇到了这种情况

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-11-18
    • 1970-01-01
    • 1970-01-01
    • 2018-04-17
    • 2021-06-29
    • 1970-01-01
    • 2021-05-27
    • 1970-01-01
    相关资源
    最近更新 更多