Currently ORIGAM has the following decision logic of HttpRequest XSLT function and HttpService.SendRequest workflow method:
if (response.ContentType.Equals("text/xml")
else if (response.ContentType.StartsWith("text/"))
else if (response.ContentType.StartsWith("application/json"))
else {
// result is binary
}
But there are many other response types that are designated as XML or JSON (the two response formats we automatically convert to data). See this for example:
Auto Detection
I think we should support the following content types to autodetect:
text/xml
→ xmlapplication/xml
→ xml- anything ending with
+xml
→ xml - anything ending with
+json
→ json
Forcing content-type
We could add a parameter that would enforce a specific “known” content type — xml or json. With it it would be even possible to get the original xml/json data as text.