您好,麻烦您粘贴一下完整的响应头。最好不要用截图,直接粘贴代码。

我的请求头设置应该是没有问题吧。我为了不出错,这块请求的代码是从postMan中生成的,同样生成的O-C代码可以运行请求成功,以下是响应头:
Server: openresty
Date: Sat, 28 Apr 2018 08:07:50 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Location: https://tab.leancloud.cn/1.2/rtm/conversations?redirectByAPI=cn
Cache-Control: max-age=120
Strict-Transport-Security: max-age=31536000

以下是响应的body:
{"ttl":3600,"push_router_server":"router-q0-push.leancloud.cn","api_server":"tab.leancloud.cn"}

文档我已仔细阅读,通过postman发送的mock请求也收到了正确的响应。但是通过java代码进行请求时获得了异常的响应,团队内是否有java工程师能进行一下测试。以下是源码:

    OkHttpClient client = new OkHttpClient();

    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\"name\":\"along's Conversation \",\"type\": \"test\"}");
    Request request = new Request.Builder()
            .url("https://qedxkndk.api.lncld.net/1.2/rtm/conversations")
            .post(body)
            .addHeader("x-lc-id", "myLcId)
            .addHeader("x-lc-key", "myLcKey")
            .addHeader("content-type", "application/json")
            .build();

    Response response = null;
    try {
        response = client.newCall(request).execute();
    } catch (IOException e) {
        e.printStackTrace();
    }

华东节点的地址是 lncldapi.com 结尾的域名,例如 https://shpxzdxa.api.lncldapi.com,你登录帐号后可以在文档上看到你的应用的独立域名。

感谢您的回复,已成功解决。由于我创建了1个华东的应用,1个华北的应用,看文档并没有发现这其中域名的变化~ 再次由衷感谢