Logic Apps: HTTP action block not sending "Content-Type" header

Ryan Matthes 16 Reputation points
2020-12-02T18:08:53.177+00:00

We have a REST integration running between Microsoft's Logic Apps service (on Azure) and our NetSuite tenant. Logic Apps can perform REST operations to e.g. GET data from external services, such as NetSuite. For NetSuite to respond to the GET request, it needs to know how we want its response returned -- as XML, as JSON, etc. So in the request, I add a "Content-Type" header with a value of "application/JSON". NetSuite can then interpret that and send its data back as JSON.

Unfortunately it doesn't look like Logic Apps is actually sending out the "Content-Type" header, so NetSuite doesn't know how to respond, and our integration fails. I know Logic Apps isn't sending this header because as a test I redirected the request to point to a second Logic App, which just returns any headers it receives. Sure enough, no "Content-Type" header is being returned by that second Logic App. As another test, if I hit the second Logic App with a request sent via Postman, one that I've verified contains a "Content-Type" header, then the second Logic App shows it received my "Content-Type" header. I can only conclude my first Logic App isn't sending out the header I need it to.

This is not documented behavior. In fact as documented, it should be working -- see "Omitted HTTP headers" here: https://learn.microsoft.com/en-us/azure/connectors/connectors-native-http

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

6 answers

Sort by: Most helpful
  1. Tor Arne Gjelhus 1 Reputation point
    2021-01-25T20:06:46.77+00:00

    Hi

    I was facing he same issue and came here for a solution, but then i found this documentation: https://learn.microsoft.com/en-us/azure/connectors/connectors-native-http#known-issues

    If i read this correctly logic apps removes content-type among other headers outbound without error.

    best regards
    Tor Arne Gjelhus


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.