how to use dartfn to implement a gcp cloud function that handles a post

18 views Asked by At

I'm looking at using google cloud functions via the dartfn project.

https://github.com/GoogleCloudPlatform/functions-framework-dart

My problem is that I can't find any doc on handling a post request.

I have existing code that uses shelf to handle a post request and apparently dartfn is based on shelf but I can find no doco in implementing a post handler.

The standard hello world app implements:

@CloudFunction()
Response function(Request request) => Response.ok('Hello, World!');

The @CloudFunction annotation takes a target but not a method.

0

There are 0 answers