Response Module Documentation

doctor.response.CT = ~CT

A type variable to represent the type of content of a Response.

class doctor.response.Response(content, headers=None, status_code=None)[source]

Represents a response.

This object contains the response itself along with any additional headers that should be added and returned with the response data. An instance of this class can be returned from a logic function in order to modify response headers.

Parameters:
  • content (~CT) – The data to be returned with the response.
  • headers (dict) – A dict of response headers to include with the response
  • status_code (int) – The status code for the response.