We are trying to make a GET request to OData REST service using Katalon Studio and we always get “Unsupported media type requested”. However through browser or Postman we dont have this issue and everything works as expected.
Any suggestion here? is this a bug in Katalon Studio? Can we make requests using katalon studio to OData REST service?
Here is the response withing Katalon Studio
<?xml version="1.0" encoding="utf-8"?><m:error xmlns:m=“http://schemas.microsoft.com/ado/2007/08/dataservices/metadata”>
<m:code />
<m:message xml:lang=“en-US”>Unsupported media type requested.
</m:message>
<m:innererror>
<m:message>The MIME type 'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2' requires a '/' character between type and subtype, such as 'text/plain'.
</m:message>
<m:type>Microsoft.Data.OData.ODataContentTypeException
</m:type>
<m:stacktrace> at Microsoft.Data.OData.HttpUtils.ReadMediaTypeAndSubtype(String mediaTypeName, Int32& textIndex, String& type, String& subType)
at Microsoft.Data.OData.HttpUtils.ReadMediaTypes(String text)
at Microsoft.Data.OData.MediaTypeUtils.GetContentTypeFromSettings(ODataMessageWriterSettings settings, ODataPayloadKind payloadKind, MediaTypeResolver mediaTypeResolver, MediaType& mediaType, Encoding& encoding)
at Microsoft.Data.OData.ODataMessageWriter.EnsureODataFormatAndContentType()
at Microsoft.Data.OData.ODataUtils.SetHeadersForPayload(ODataMessageWriter messageWriter, ODataPayloadKind payloadKind)
at System.Data.Services.ResponseContentTypeNegotiator.DetermineResponseFormat(ODataPayloadKind payloadKind, String acceptableMediaTypes, String acceptableCharSets)
</m:stacktrace>
</m:innererror>
</m:error>