服务器使用Nodejs实现 客户端2dx实现,http请求问题

请把代码粘贴在这里

今天搭建了一个建议的Nodejs服务器,可是使用cocos2dx的HttpClient进行请求无法报错,不知为何,求解答。
请求部分代码如下:

HttpClient* hClient = HttpClient::getInstance();

HttpRequest * hRequest = new HttpRequest();

hRequest->setRequestType(cocos2d::network::HttpRequest::Type::GET);
hRequest->setTag(StringUtils::format("%d", type).c_str());
hRequest->setUrl(“https://127.0.0.1:8888/”);
hRequest->setResponseCallback(CC_CALLBACK_2(CLoginHttp::onHttpRequestCompleted, this));

hClient->send(hRequest);
hRequest->release();

代码测试官网请求网址返回正确数据,可是请求自己用nodejs做的服务器时就返回如下错误:

In the constructor of HttpClient!

2015-12-03 18:14:33.992 Cocos3Game2-mobile Starting to load https://127.0.0.1:8888/

2015-12-03 18:14:34.209 Cocos3Game2-mobile CFNetwork SSLHandshake failed (-9806)

2015-12-03 18:14:34.209 Cocos3Game2-mobile NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9806)

CLoginHttp::onHttpRequestCompleted, httpTag = 5

HTTP Status Code: -1, tag = 5

response failed

error buffer: An SSL error has occurred and a secure connection to the server cannot be made.

请哪位大神指教。

谢谢!!!

看着代码 没问题! 我今天 正好也试了试 nodejs,可以啊! 你先拿 浏览器试试吧!! 看看能访问不!

https这个请求,需要证书,要不你没给证书,要不证书不对

谢谢 :14: :14: :14: :14:

解决了吗?我现在也遇到同样的问题

解决了吗?我现在也遇到同样的问题