chore(functions/http): Update 'request body' sample to use gen2 sig
tested:
go test
deploy + curl
@@ -24,8 +24,15 @@ import (
"io/ioutil"
"log"
"net/http"
+
+ "github.com/GoogleCloudPlatform/functions-framework-go/functions"
)
+func init() {
+ // Register an HTTP function with the Functions Framework
+ functions.HTTP("HelloContentType", HelloContentType)
+}
+
// HelloContentType is an HTTP Cloud function.
// It uses the Content-Type header to identify the request payload format.
func HelloContentType(w http.ResponseWriter, r *http.Request) {
