SAP Knowledge Base Article - Public

3280397 - Error "Unknown content type text/plain" when executing OData Query

Symptom

When user trying to perform OData query using postman application and getting below error. 

<?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">    <code>BadRequestException</code>    <message lang="en-US">Unknown content type text/plain</message></error>
  

  • Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP SuccessFactors HXM Suite
    • Integrations
      • OData API

Reproducing the Issue

1. In the postman application try to run the Upsert query.

https://apisalesdemo4.successfactors.com/odata/v2/upsert

2. Use the correct payload

2. Getting below error 

<message lang="en-US">Unknown content type text/plain</message></error>

Cause

This is expected behavior from System.

Resolution

You need to change the Body format to raw in that and change type from 'Text' To 'JSON'

Upset will be successful

Keywords

OData, Postman, Upsert, Unknown content type text/plain, JSON, BadRequestException , KBA , LOD-SF-INT-ODATA , OData API Framework , Problem

Product

SAP SuccessFactors HXM Core all versions ; SAP SuccessFactors HXM Suite 2211