415 Unsupported Media type when doing POST call #33883
-
I have these two classes Item and Drink. Where Drink extends Item. Both are PanacheEntities and only consists a few basic fields. Code samples of this part (I left the getters and setters out of it):
I am still in the phase of creating some basic CRUD operations. So I have this POST operation in the controller which I want to test via Postman, but it returns a 415 error code. This is the controller function:
And this is the repository function that gets called:
I do know that there should be a domain layer in between for best practices, but that will be fixed after this problem. This is the body I enter in the Postman call:
Where is the problem? I already tried to add @consumes(MediaType.APPLICATION_JSON), but that does not work either. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Maybe you forgot to add dependency for JSON serialization, like Jackson or JSON-B. |
Beta Was this translation helpful? Give feedback.
Maybe you forgot to add dependency for JSON serialization, like Jackson or JSON-B.