ADF data flow rest connector read data with application/json content-type header
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