Get request is not sending header changes

tommy78
Thu, 28 Nov 2024 14:29:22 +0000
Help Hub

Dear community,
I hope someone can help me. When I send curl -H “Accept: application/xml” localhost:8080/movie to my server. I get the answer in xml format. But when I tray to do it in postman, is it not working. In Postman I did a Get request http://localhost:8080/movie and I added under headers a key ( Content-Type) value (application/xml), with the name Content-Type-xml. When I look under Headers I can see that my Content-Type-xml ist checked. When I send my request, my result is only in json not in xml. My server send json in default. I make only this changes. Can someone tell me, what I’m doing wrong?

7 posts - 3 participants