I'm currently working through the Mulesoft Mule 4 Fundamentals course and have deployed an application on Runtime Manager.
When I look in the logs of my application on Runtime Manager and the logs of Anypoint Studio I see the above "Unsupported Media Type" error when testing a GET HTTP request. I also get this error when testing in ARC.
When I look in the Mule debugger and then the payload in Anypoint Studio I see mediaType = */* charset = UTF-8
I thought that this does not need to be added for GET requests, so how do I get around this?
My RAML file:
#%RAML 1.0
title: session-2
types:
newsProperties: !include schemas/newsDataType.raml
/search:
get:
headers:
Accept:
default: application/json
queryParameters:
keyword:
type: string
minLength: 3
maxLength: 10
responses:
200:
body:
application/json:
example: !include examples/searchExample.raml
400:
body:
application/json:
example:
{"message": "Search query too long"}
/news:
post:
queryParameters:
country:
required: false
body:
application/json:
type: newsProperties
responses:
201:
body:
application/json:
example: !include examples/searchExample.raml
/sportsNews:
put:
body:
application/json:
type: newsProperties
The header in the /search resource GET method has been added recently after searching online and trying a number of different solutions I've seen, but I am still getting the same error. Any help would be appreciated.
Thanks!