title: How to I return JSON from a Google Cloud Function
body: <p>How do I return JSON from a HTTP Google Cloud Function in Python? Right now I have something like:</p>
  
  <pre><code>import json
  
  def my_function(request):
      data = ...
      return json.dumps(data)
  </code></pre>
  
  <p>This correctly returns JSON, but the <code>Content-Type</code> is wrong (it's <code>text/html</code> instead).</p>