Permalink
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (15 sloc) 315 Bytes
metadata:
title: Custom response
example start: 3
documentation: "https://docassemble.org/docs/functions.html#response"
---
modules:
- docassemble.base.util
---
imports:
- json
---
mandatory: True
code: |
data = dict(fruit='apple', pieces=2)
response(json.dumps(data), content_type="application/json")