在尝试通过 GCM 将我的消息从我的服务器发送到 Android 手机时
收到以下错误:
{"collapse_key":"update","registration_ids":["the reg I got from the phone"],"delay_while_idle":true,"data":{"info":"data_changed"}}, response is: $VAR1 = bless( {
'_content' => 'Can\'t connect to android.googleapis.com:443 (Network is unreachable)
LWP::Protocol::https::Socket: connect: Network is unreachable at /usr/local/share/perl5/LWP/Protocol/http.pm line 51.
',
'_rc' => 500,
'_headers' => bless( {
'client-warning' => 'Internal response',
'client-date' => 'Sun, 22 Sep 2013 18:23:10 GMT',
'content-type' => 'text/plain',
'::std_case' => {
'client-warning' => 'Client-Warning',
'client-date' => 'Client-Date'
}
}, 'HTTP::Headers' ),
'_msg' => 'Can\'t connect to android.googleapis.com:443 (Network is unreachable)',
'_request' => bless( {
'_content' => '{"collapse_key":"update","registration_ids":["the reg I got from the phone"],"delay_while_idle":true,"data":{"info":"data_changed"}}',
'_uri' => bless( do{\(my $o = 'https://android.googleapis.com/gcm/send')}, 'URI::https' ),
'_headers' => bless( {
'user-agent' => 'libwww-perl/6.05',
'content-type' => 'application/json; charset=UTF-8',
'content-length' => 266,
'authorization' => 'key=my api key'
}, 'HTTP::Headers' ),
'_method' => 'POST'
}, 'HTTP::Request' )
}, 'HTTP::Response' );
我一直在尝试不同的东西,但无法让它工作我在我的服务器端使用 perl,但这不会影响这个问题,因为这是一个简单的 http post 请求,这似乎并不去工作
有人知道为什么会这样吗?