# Content-type variation on User session export.

**URL:** <https://community.dynatrace.com/t/content-type-variation-on-user-session-export/18649>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, user-sessions\
**Created:** [March 3, 2020, 10:57am UTC](https://community.dynatrace.com/t/content-type-variation-on-user-session-export/18649 "2020-03-03T10:57:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierre\_boucher1](https://avatars.discourse-cdn.com/v4/letter/p/3be4f8/32.png) [@pierre\_boucher1](https://community.dynatrace.com/u/pierre_boucher1)\
**Post date:** [March 3, 2020, 10:57am UTC](https://community.dynatrace.com/t/content-type-variation-on-user-session-export/18649/1 "2020-03-03T10:57:52Z")

</div>

We have issue on exporting user sessions to our dedicated webserver.

We receive correct http requests with a header {“Content-Type”=\>“application/json”} and a JSON message in the body.

We also receive many http requests without any content in the body and with a different header {“Content-Type”=\>“text/xml; charset=\“utf-8\””}.

Is it an issue ?

---

<div class="post-metadata">

**Author:** ![pierre\_boucher1](https://avatars.discourse-cdn.com/v4/letter/p/3be4f8/32.png) [@pierre\_boucher1](https://community.dynatrace.com/u/pierre_boucher1)\
**Post date:** [March 3, 2020, 11:23am UTC](https://community.dynatrace.com/t/content-type-variation-on-user-session-export/18649/2 "2020-03-03T11:23:50Z")

</div>

In fact the json message from Dynatrace is rejected by our web server.

Dynatrace show me error :

```auto
Exporting user session data to the configured custom REST endpoint https://api-preprod.groupe-psa.com/dev/public/application/newapvrhub/sbox-rum/v1/kafka/topics/service-box-topic?client_id=xxxxxxxxxxxxxxxxx failed: Status: 400: Bad Request - { "httpCode":"400", "httpMessage":"Bad Request", "moreInformation":"The body of the request, which was expected to be JSON, was invalid, and could not be decoded. The json syntax was invalid (invalid trailing character)." }

```

How can I avoid this error coming from a request built by Dynatrace “User session export” ?

---

<div class="post-metadata">

**Author:** ![pierre\_boucher1](https://avatars.discourse-cdn.com/v4/letter/p/3be4f8/32.png) [@pierre\_boucher1](https://community.dynatrace.com/u/pierre_boucher1)\
**Post date:** [March 6, 2020, 8:10am UTC](https://community.dynatrace.com/t/content-type-variation-on-user-session-export/18649/3 "2020-03-06T08:10:21Z")

</div>

My excuses. The problem was on my API gateway which transformed the original http requests before forwarding them to the real service.
