ADF data flow rest connector read data with application/json content-type header

Pawla Homsi 0 Reputation points Microsoft Employee
2023-05-09T09:16:59.7666667+00:00

I'm trying to read data with rest connector inside an adf data flow, i'm adding the content-type header as application/json; charset=utf-8

and it's returning this error,

failure to read most recent page request: DF-REST_001 - Error response from server: Some({"error":{"message":"The request had some invalid properties","code":"BadArgumentError","correlationId":"{correlationId}","details":[{"code":"InvalidJsonBody","message":"unsupported content encoding \"utf-8\"","target":null}],"innererror":{"code":"QueryValidationError","message":"Failed parsing the query"}}}), Status code: 400. Please check your request url and body. ({URL},request body: Some({QUERY}), request method: POST)

when I change the header to text/json the error disappear but the data object returned is empty.

Note I tried the exact same request in a adf pipeline copy activity with the application/json header and it worked perfectlty. when I changed the header in the pipeline to text/json it's returning the same empty response from as data flow

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,198 questions
{count} votes