Java Zendesk Post票证失败,Android中的422 |不可处理实体
在我的应用程序中,使用Zendesk API与客户进行交互。直到3个月前,我们的支持团队收到了邮件。但现在我们正在升级Zendesk API 2。 如下Java Zendesk Post票证失败,Android中的422 |不可处理实体,java,android,zendesk,Java,Android,Zendesk,在我的应用程序中,使用Zendesk API与客户进行交互。直到3个月前,我们的支持团队收到了邮件。但现在我们正在升级Zendesk API 2。 如下 https://<domain>.zendesk.com/api/v2/tickets.json 你能帮忙吗?当通过我的model/poco类将过去的地方设置为空时,我就有了这个问题 HttpURLConnection connection = client.open(new URL(encoded_url));
https://<domain>.zendesk.com/api/v2/tickets.json
你能帮忙吗?当通过我的model/poco类将过去的地方设置为空时,我就有了这个问题
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);