Interface HttpFunction

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

Represents a Cloud Function that is activated by an HTTP request.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    service(HttpRequest request, HttpResponse response)
    Called to service an incoming HTTP request.
  • Method Details

    • service

      void service(HttpRequest request, HttpResponse response) throws Exception
      Called to service an incoming HTTP request. This interface is implemented by user code to provide the action for a given function. If the method throws any exception (including any Error) then the HTTP response will have a 500 status code.
      Parameters:
      request - a representation of the incoming HTTP request.
      response - an object that can be used to provide the corresponding HTTP response.
      Throws:
      Exception - if thrown, the HTTP response will have a 500 status code.