Skip to content

No payload in GOAWAY frame #219

Open
@ghost

Description

I'm trying to send POST request to Apple Push Notifications server (APN). I'm getting GOAWAY frame without payload data, through APN manual states that it must contain a JSON data.

The code I'm using:

var logger = {
    fatal: noop,
    error: noop,
    warn : noop,
    info : noop,
    debug: function(data) {
        console.log(data);  //GOAWAY frame appears with no payload
    },
    trace: noop,
    child: function() { return this; }
};

var req = http2.request({
    hostname: 'api.push.apple.com',
    protocol: 'https:',
    port: 443,
    method: 'POST',
    path: '/3/device/' + deviceToken,
    agent: new http2.Agent({log: logger}),
    headers: {
        'Authorization': 'bearer ' + providerToken,
        'apns-topic': 'web.com.example'
    }
}, function(res) {
    console.log('done');
    res.pipe(process.stdout);
});
req.write(JSON.stringify(post));
req.end();

Should I do extra actions to get a payload?

Thank you very much for this module!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions