Request.is(['json', 'html'])

Hey team,
i am trying to use “request.is([‘json’, ‘html’])” method, POST API method is working fine but in case of GET API its not returning the content-type instead of content-type it is returning nothing means empty so how i will check or validate the content type.

Can you share some code?

if(request.is([‘json’]) != ‘json’) {
response.send({error:“OOPS, content type mismatch.”})
}