Unsupported Media Type from C# JSOn serialized webApi (body set to raw JSON)

In Visual Studio C# I created a web API.
When I test my web API in C# I put a POST: https://localhost:7233/api/ShopFloor

C# returns a JSON dataset.

In Postman I get the error:
{
“type”: “RFC 7231: Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content”,
“title”: “Unsupported Media Type”,
“status”: 415,
“traceId”: “00-b75081b28d37a203ab203a8053fad13f-c78a2fb150d3ecff-00”
}

When I search for this error I found that in Postman I needed to set the body to RAW and select JSON. Which I did.

But I still get this error.

What do I need to do so that I can see the returned dataset in Postman?

If I perform a GET than this is no problem, this functions OK.
If I perform a PUT, than I have the same problem.

Kind regards,

Clemens Linders

Try to use header content-type: application/json

Hi mhers,

In headers I created an extra key:
Key: Content-type
Value: application/json

I now get the following error:

{
“type”: “RFC 7231: Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content”,
“title”: “One or more validation errors occurred.”,
“status”: 400,
“traceId”: “00-59776bed9e8c11712c242fe599b418c6-75cd2c7d1909830a-00”,
“errors”: {
“”: [
“A non-empty request body is required.”
],
“sfData”: [
“The sfData field is required.”
]
}
}