I have created a web service to update our passbooks with the following entries in my routes file:
// Registering a Device to Receive Push Notifications for a Pass app.post('/Passbook/v1/devices/:dli/registrations/:typeid/:serial', PBAdmin.registerDevice);
// Getting the Serial Numbers for Passes Associated with a Device app.get('/Passbook/v1/devices/:dli/registrations/:typeid',PBAdmin.getSerialNumbers);
// Getting the Latest Version of a Pass app.get('/Passbook/v1/passes/:typeid/:serial', PBAdmin.getUpdatedPass);
// Unregistering a Device app.delete('/Passbook/v1/devices/:dli/registrations/:typeid/:serial', PBAdmin.unregisterDevice);
// Logging Errors app.post('/Passbook/v1/log', PBAdmin.logErrors);
The problem is that after a passbook is downloaded by a user my web service end point receives a GET request instead of POST request for registering a device (from my log file)
GET /Passbook/v1/devices/xxxxxxxxxxxxxxe99ddc69a5a9/registrations/xxx.xxxx.xxxx.app.dev.passbook/1408646948910 401 18ms - 12b
In fact this happens for the log handler as well (which is supposed to be POST with error message). I am not sure why that is and how to fix it.