Hello. I'm trying to understand if your framework can be used for test automation of REST APIs that have Content-Type = 'application/jose;v=1.
@ptrthomas it is not very clear how to handle the Content-Type='application/jose;v=1 from the links you have posted above. Can you please provide more details or share a document?
@JuliaSv @alwaysnandan the question was not clear in the first place and I gave it the answer I think it deserved ^_^
anyway I now did a web search and honestly I had never heard of this JOSE thing before ! http://jose.readthedocs.io/en/latest/
it looks like it is just a header encryption scheme. I'm providing 2 more examples below, one is for using Java to encrypt a header and the other is for OAuth:
https://github.com/intuit/karate#http-basic-authentication-example
https://github.com/intuit/karate/blob/master/karate-demo/src/test/java/demo/oauth/oauth2.feature
now it is up to you. you actually have an opportunity to share an example that the rest of the community can benefit from. and I'd appreciate better quality questions, ideally after you try something - instead of asking me to provide documents for you. it is somewhat insulting, considering how much effort has gone into the existing documentation.
Thanks @ptrthomas for responding to my question. Below is how we ended up solving the Content-Type JOSE:
Given url 'URL'
Given header Accept = 'application/vnd.com.companyname.api+v1+jose'
Given header Api-Key = 'MOBILE'
Given header Content-Type = 'application/vnd.com.companyname.api+v1+json'
Given header Channel-Type = 'WEB'
Given request {transactionId: '12345' }
When method post
Then status 200
Honestly. I don't understand what is the meaning of 'application/vnd.com.companyname.api+v1+json' and how it is working but looks like since my allows content-type=application/jose;v=1 then in Karate it's equivalent is 'application/vnd.com.companyname.api+v1+json'
great, thanks !