HTTPS Functions

Equivalent of - https://firebase.google.com/docs/functions/http-events‚Äč

functions:
- name: myHttpsFunction
type: https
# The request method is 'post' by default
# but you can change it to 'get', 'delete', 'options', or 'put'
method: get
# You can add segments and URL queries to the request route
route: /login/new?key=value
# The payload field can either be a JSON string
payload: '{"field":"value"}'
# or you can reference a document from your production Firestore
payload:
doc:
getFromProd:
collection: path/to/collection
id: doc-id
# or you can reference a document from the emulated Firestore
payload:
doc:
collection: path/to/collection
id: doc-id

Multiple routes for the same HTTPS function

You can define the same function multiple times with different method and route fields.

functions:
- name: myHttpsFunction
type: https
method: get
route: /login/new?key=value
payload: '{"field":"value"}'
- name: myHttpsFunction
type: https
method: post
route: /another/route
payload: '{"field":"value"}'