Article Details
| Id: | 18151 | 
| Product: | finPOWER Connect Cloud | 
| Type: | INFO | 
| Version: | 3.04.00.28 | 
| Opened: | 04/05/2021 | 
| Closed: | 06/05/2021 | 
| Released: | 01/07/2021 | 
| Job: | J026500 | 
HTML Widgets and Portals; Response from widget.GetString always has a MIME type of "text/plain"
The HTTP header returned from any HTML Widget event called via widget.GetString JavaScript command always specifies a MIME type of "text/plain".
This is by design since we do not dictate the format of the data returned from a widget event. It may well be a simple text message or maybe a piece of HTML to be viewed in a widget.UI.PreviewPane control. It just so happens that most of our responses tend to be JSON text.
Therefore we don't specify a MIME type of "application/json".
Also, to keep things simple for HTML Widget development, we do not require (or even give the ability for) a developer to specify the format of the data they are returning.