Skip to main content

HTTPEventHandler <Configuration, Service, Profile, Body, Path, Query, Headers, Result, Security, GV, Authorizer>

Index

Properties

optionalbodyType

bodyType?: json | binary | plaintext

handler

handler: (request: NoInfer<HTTPRequest<InferFromParser<Body, undefined>, InferFromParser<Path, undefined>, InferFromParser<Query, undefined>, InferFromParser<Headers, undefined>, Security, GV, Authorizer>>, context: LambdaContext<Configuration, Service, Profile>) => Promisable<Try<{ [ KeyType in string | number | symbol ]: IfEmptyObject<NoInfer<Result>, { body: unknown; headers?: HTTPHeaders; statusCode: number }, _HTTPResponses<NoInfer<Result>>>[KeyType] }>>

Type declaration

    • (request: NoInfer<HTTPRequest<InferFromParser<Body, undefined>, InferFromParser<Path, undefined>, InferFromParser<Query, undefined>, InferFromParser<Headers, undefined>, Security, GV, Authorizer>>, context: LambdaContext<Configuration, Service, Profile>): Promisable<Try<{ [ KeyType in string | number | symbol ]: IfEmptyObject<NoInfer<Result>, { body: unknown; headers?: HTTPHeaders; statusCode: number }, _HTTPResponses<NoInfer<Result>>>[KeyType] }>>
    • Parameters

      • request: NoInfer<HTTPRequest<InferFromParser<Body, undefined>, InferFromParser<Path, undefined>, InferFromParser<Query, undefined>, InferFromParser<Headers, undefined>, Security, GV, Authorizer>>
      • context: LambdaContext<Configuration, Service, Profile>

      Returns Promisable<Try<{ [ KeyType in string | number | symbol ]: IfEmptyObject<NoInfer<Result>, { body: unknown; headers?: HTTPHeaders; statusCode: number }, _HTTPResponses<NoInfer<Result>>>[KeyType] }>>

optionalmethod

method?: HTTPMethod

optionalpath

path?: `/${string}`

schema

schema: { authorizer?: Authorizer; body?: Body; headers?: Headers; path?: Path; query?: Query; responses: Result }

Type declaration

  • optionalauthorizer?: Authorizer
  • optionalbody?: Body
  • optionalheaders?: Headers
  • optionalpath?: Path
  • optionalquery?: Query
  • responses: Result

optionalsecurity

security?: Security