OData REST service is returning Unsupported Media Type when using Katalon Studio

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>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:stacktrace>   at Microsoft.Data.OData.HttpUtils.ReadMediaTypeAndSubtype(String mediaTypeName, Int32&amp; textIndex, String&amp; type, String&amp; subType)&#xD;

  at Microsoft.Data.OData.HttpUtils.ReadMediaTypes(String text)&#xD;

  at Microsoft.Data.OData.MediaTypeUtils.GetContentTypeFromSettings(ODataMessageWriterSettings settings, ODataPayloadKind payloadKind, MediaTypeResolver mediaTypeResolver, MediaType&amp; mediaType, Encoding&amp; encoding)&#xD;

  at Microsoft.Data.OData.ODataMessageWriter.EnsureODataFormatAndContentType()&#xD;

  at Microsoft.Data.OData.ODataUtils.SetHeadersForPayload(ODataMessageWriter messageWriter, ODataPayloadKind payloadKind)&#xD;

  at System.Data.Services.ResponseContentTypeNegotiator.DetermineResponseFormat(ODataPayloadKind payloadKind, String acceptableMediaTypes, String acceptableCharSets)




Just a bit more information… I found some publicly available OData services (https://www.odata.org/odata-services/ ) and it looks like OData v4 and OData v2 are working OK when run from Katalon Studio but only OData v3 services are throwing this error. (again all of them (v4, v3, and v2) work fine when run via Postman or browser.

The issue appears to be resolved after upgrading to Katalon Studio 5.5 (had 5.4.1) but there was nothing in the release note regarding this fix.

1 Like