Published on InterSystems Developer Community (https://community.intersystems.com)

Home > HTTP POST - unsupported media type - JSON

Question
Andrew Makinson · Sep 3, 2018

HTTP POST - unsupported media type - JSON

In a EnsLib.REST.Operation I have...

Set tSC=..Adapter.Post(.tHttpResponse,,pRequest.stream)

This sends JSON string over HTTP

I am getting this error back from the server

ErrHTTPStatus: Received non-OK status 415 from remote HTTP server: 'HTTP/1.1 415 Unsupported Media Type'

I have been told that the media type should be "JSON"

how do I go about changing the media-type of the HTTP Request?

#Ensemble #Business Operation #JSON #REST API

Source URL:https://community.intersystems.com/post/http-post-unsupported-media-type-json