0

I have tried to handle it using:

@RequestMapping(method = RequestMethod.POST,produces="application/json",consumes= "application/jose;charset=UTF-8")

I get the below error:

org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/jose;charset=UTF-8' not supported

İsmail Y.
  • 3,579
  • 5
  • 21
  • 29
  • "application/jose;charset=UTF-8" - I've never seen this before. Apparently neither has Spring. Not supported out of the box. – duffymo Aug 12 '21 at 11:35
  • May be your request doesn't contain the header "Content-Type: application/jose". Please check. I am able to test successfully with the annotation you have posted. I used `curl -X POST http://localhost:3005/v1/context -H "Content-Type: application/jose" -d "abc"` – Sree Kumar Aug 12 '21 at 11:40
  • @SreeKumar Thank you for your response. My Request does contain "Content-Type: application/Jose" in header. Do you have any other external library which supports encrypted requests? I executed your command and got the same error. – Ravi Ranjan Aug 12 '21 at 11:48

0 Answers0