Payload Problems With Cloud Task Creation

41 Views Asked by At

Im trying to pass data between a Cloud Task ceated by a Cloud Function and a 2nd Cloud Function that the Cloud Task runs.

The Cloud Task is being created properly and is doing its job and running the 2nd function but the 2nd funciton is not reciving any data from the Cloud Task Payload...

This is the request im sending out from the first Cloud Function:

    const task = {
    httpRequest: {
        httpMethod: 'POST',
        url: 'https://my-function-endpoint',
    },
    scheduleTime: { seconds: parseInt(waitTime) + Date.now() / 1000 },
    payload: Buffer.from(JSON.stringify({ uid: uid })).toString('base64'),
};

I have console.loged request.body in the 2nd Cloud Function and it is empty..

I have been working on this for hours and any help would be apreceated!

0

There are 0 best solutions below