$webinfo("httpresponseheaders")
Author: knut.dybendahl@gmail.com (Knut)
So, I've been fighting the proc manual for quite some time.... Got a Uniface component being called by a .NET application so they want the content-type set to application/json on the way back. Simple I thought... Manual states $webinfo("HTTPRESPONSEHEADERS") = "content-type=application/json GOLD ; accept:application/json" Negative - content-type remains "text/html" and accept is nowhere to be seen. Now try: putitem/id $webinfo("HTTPRESPONSEHEADERS"), "Accept", "application/json" Hey presto, "accept:application/json" appears. Let's add putitem/id $webinfo("HTTPRESPONSEHEADERS"), "content-type", "application/json"
- the returned json (from $webinfo("OUTPUT") gets corrupted, but "content-type:application/json" appears in the header... Has anyone seen this before? If so, how did you get around it? Knut