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
  • 2,232
  • 3
  • 15
  • 33

1 Answers1

4

Found the answer here

In my case, I would do:

myFunction.post().json({...})
Josh
  • 2,232
  • 3
  • 15
  • 33