How to work around Azure Logic App omitting HOST header in HTTP action?

Dataholic 80 Reputation points
2023-06-09T15:55:00.1633333+00:00

Working with Logic App for HTTP action with a REST API which mandate HOST and Accept-Charset in the header section.

However, from this Microsoft article, HOST and Accept-* will be removed these headers from the generated request message without showing any warning or error.

See "Omitted HTTP headers" here: https://learn.microsoft.com/en-us/azure/connectors/connectors-native-http

I click "Logic app code view" on the portal and can see Host and Accept-Charset in the header section. But it looks like still be removed when sending out the request and got error.

What are the possible solutions?

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

Accepted answer
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2023-06-12T07:01:08.7133333+00:00

    @Dataholic Thanks for reaching out.

    Yes, host and Accept-* header will be Omitted as you have shared in the document.

    One of the workarounds will be leveraging the azure function and call azure function from logic app.

    Now at your Azure function app end you would be calling your endpoint and pass the HOST and Accept-* header and once you got the response from your service you the function will send response back to logic app.

    Similarly, you can leverage any other custom service or APIM to offload this functionality of calling your endpoint with the HOST and Accept-* header.

    Unfortunately, as of now there is no workaround at the HTTP connector end.

    Feel free to get back to me if you have any queries or concerns.

    Please "Accept Answer" if the answer is helpful so that it can help others in the community.


0 additional answers

Sort by: Most helpful

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.