title: Return JSON data in response in ColdFusion
body: <p>I'm working in ICIMS API. I need to return JSON data and some specific data in header in a cfm page call by ICIMS server.</p>
  
  <p>Here is the response should be:</p>
  
  <p>Response to the Work Flow Status Change PUSH event to the platform:</p>
  
  <pre><code>HTTP/1.1 303 See Other
  Location: http://xx.xx.xx.xx:8085/selectpackage?systemHash=101
  Content-Type: application/json
  {
  "userMessage":"Confirm or modify package.",
  }
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p><strong><em>Answer:</em></strong></p>
  
  <pre><code>&gt; &lt;cfset contentString = '{"userMessage": "Confirm or modify package."}'
  &gt; /&gt;
  &gt; 
  &gt; &lt;cfheader name="Location"
  &gt; value="http://xx.xx.xx.xx:8085/selectpackage?systemHash=101" /&gt;
  &gt;     &lt;cfcontent type="application/json" variable="#toBinary( toBase64( contentString ) )#" /&gt;
  </code></pre>