1

I've been able to attach the body of a POST request in Firebase CLI before, but the documentation lacks any examples of how to do it again.

Example:

I try:

myFunction.post({body: {...}})

But receive the following error:

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string or Buffer. Received type object

I would like to access the data passed via req.body. Any ideas?

Josh
  • 1,782
  • 3
  • 14
  • 30

1 Answers1

3

Found the answer here

In my case, I would do:

myFunction.post().json({...})
Josh
  • 1,782
  • 3
  • 14
  • 30