Config 2.1: HTML Types

For HTML or TEXT types, which need templates to render, you define only two keys. For example,

"Chartags": {
  "html": {
    "Content_type":"text/html; charset=UTF-8",
    "Short":"html"
  },
  "p": {
    "Content_type":"text/plain; charset=UTF-8",
    "Short":"txt"
  }
}

where Content_type is for the returned HTTP header Content-Type; and Short is optional. There are two templates, one is associated with component/action.html and the other component/action.p.

If you access an URL whose tag is not defined or whose template does not exist, an error message will be displayed.

Comments are closed.