tornado-openapi
  • Overview
  • Quick Start
  • Reference
    • OpenApiConfigurator
    • OpenApiConfiguration
    • OpenApiHandler
    • decorators.*
      • anonymous
      • api
      • apiKey
      • bearerToken
      • cookie
      • header
      • httpBasic
      • mutualTLS
      • oauth2
      • openId
      • request
      • response
    • objects.*
  • MIT License
  • Contact
tornado-openapi
  • Reference
  • Decorators
  • header

header

header(name: str, t: type = <class 'str'>, description: str = None, required: bool = False, deprecated: bool = False) → Callable

Indicates that a request handler expects a particular header.

Parameters:
  • name (str) – REQUIRED. The header name that is expected.

  • t (type) – If the header represents a particular data type. Encoding/Decoding the header remains the responsibility of the application/server. Default is str.

  • description (str) – An optional description for the header or its content.

  • required (bool) – True If the header is required. Default is False.

  • deprecated (bool) – True If the header is deprecated. Default is False.

Previous Next

© Copyright Shaun Wilson.

Built with Sphinx using a theme provided by Read the Docs.