500 Internal Server Error with Authorization Header

I have a problem requesting a route in Java.
If I set a wrong key I will get a 403 error or a 401 if I set no key.
But if I set my correct authorization key in Java I will receive a 500 internal server error but I cant see the error message. The request in Postman works but I have no clue why it wont work in Java.
Do you have any idea why the 500 error occures?

Thanks in advance

Fixed it. Needed to set a content-type in the java code.