How do I disable automatic decompression in Logic App?

Tomas E 1 Reputation point
2024-01-18T08:17:06.4566667+00:00

I'm using the HTTP Action in a Logic App. I want the response body to be compressed in the next step, I'm just going to save the response gzipped. The API I'm calling requires Accept-Encoding to be gzip (or deflate), it will return 406 if that header is missing in the request.

I noticed that there is an option on the HTTP Action that disables automatic decompression.

User's image

However, when that option is selected it also seems to remove the Accept-Encoding header from the request, which causes the action to fail. Adding the header manually does not seem to work either, the Logic app removed these headers.

How do I keep the compression?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,542 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2024-01-22T07:13:53.1333333+00:00

    @Tomas E Thanks for reaching out. Accept-* headers except for Accept-version will Omitted as documented here. Unfortunately, you cannot use the HTTP action.

    The workaround you can either create the custom HTTP connector or offload this function to azure function where you can add this header and call your HTTP endpoint and return the response to logic app from azure function.

    Please 'Accept Answer' if it helped so that it can help others in the community looking for help on similar topics.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.