REST work fine testing in Service Studio, but throws 406 Not Acceptable at Runtime?

Hi, this has been puzzling me for a long time, and I actually had abandoned this would-be Forge component project.

Using Service Studio to test REST API, it works fine, but throws 406 Not Acceptable at Runtime.

This is quite similar to this REST API ServiceStudio vs Runtime issue here (but different error code):

OML attached.

On Before Request added to log the entire Request Text.

It can be found in Service Center -> Monitoring -> General Logs


Request text looks right to me....

Then I debug OnBeforeRequest to check the headers.

Seem fine also.

Hi Harlin,

Why do you log the JSON to the General Log? It would seem easier to increase the logging level of the API, so you can check the Integration Logging.

Also, judging the bitly API documentation, you will be able to check the extended error information that it sends.


Yes, that wasn't the most efficient way.

Actually debugging is the fastest way to get RequestText.

Anyway, I've found the culprit...

By overwriting Content-Type header to just "application/json" at OnBeforeRequest, solve this error.

So, not every API like "application/json; charset=UTF-8" in Content-Type header.

ServiceStudio API testing use only "application/json" but Outsystems Runtime use "application/json; charset=UTF-8" in Content-Type header.

Shouldn't Outsystems internal guys need to be notified of this behaviour?


Hi Harlin,

They definitely should, so I will do just that :). Thanks for reporting back!

Hi everyone,

I would like to add I had a very similar issue which was reported in this post:

Just a heads up