title: How to handle GZip/Deflate on HTTP Actions
body: <p>I have <a href="https://docs.microsoft.com/en-us/azure/connectors/connectors-native-http" rel="nofollow noreferrer">an HTTP Action</a> in Azure Logic Apps that calls <a href="https://api.stackexchange.com/2.2/info?site=devops">a StackExchange API</a>, fundamentally, it could be any API that returned <a href="https://en.wikipedia.org/wiki/HTTP_compression" rel="nofollow noreferrer">GZip or Deflate</a> content by default:</p>
  
  <p><a href="https://i.stack.imgur.com/i7Zs1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i7Zs1.png" alt="Azure Logic Apps: HTTP Action"></a></p>
  
  <p>Because the response is neither <a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-content-type" rel="nofollow noreferrer">Plain Text nor JSON</a> the output from the HTTP Action is:</p>
  
  <pre><code>{
    "$content-encoding": "gzip",
    "$content-type": "application/json; charset=utf-8",
    "$content": "H4sIAAAAAAAEAGWPzY7CMAyE38XnqsrPFtq+ClpFoXghEkm6iVtWQrw7Lt3mAEd/Hs+M7+AIfYb+cIeAN2MHcjOaKWNiKCqgSPa6zZ2SFRzt6YzZjJiMd2EiZF0tvjbpuoZe7rrdxuZIC9KNLo5D9B4DLUIl2gpsyDfOeLflvN8JM7kYPnbF6/+WA/ZNYcOAI+Hp5V/eCKv0heVGSwD0SnRcZXQm4ewyM+hBCbmvda3aWjVaS3h8V3Cx2fiYuMePvWZcSrKV8faPSyzF1jmhty64cGbnVjyeRIHcnG0BAAA="
  }
  </code></pre>
  
  <p>If you went to the trouble of passing the <code>$content</code> field through <code>@base64toString()</code> you would end up with the Gzip binary representation of the JSON, and that is as far as I can take it.</p>
  
  <p><strong>Question</strong>: How can I either force the HTTP Action to behave like a <code>HttpClient</code> and Accept GZip data and emit the JSON from the Action, or more laboriously take the GZip Base64/Binary data and decompress it before acting further upon it?</p>