Config 2.4: XML Types

To return XML types, you need to define few extra fields. E.g.

"x":{
    "Content_type":"application/xml; charset=UTF-8",
    "Short":"xml",
    "Challenge":"challenge",
    "Logged":"logged",
    "Logout":"logout",
    "Failed":"failed",
    "Case":2
  }

where Challenge, Logged, Logout and Failed are mandatory. Their meaning are:

  • Challenge: if visitor has no valid login ticket, instead of redirecting to a login screen, Genelet returns you:
    <?xml version=”1.0″ encoding=”UTF-8″?><data>challenge</data>
  • Logged: after a successful login, Genelet returns you:
    <?xml version=”1.0″ encoding=”UTF-8″?><data>logged</data>
  • Logout: after a successful logout, Genelet returns you:
    <?xml version=”1.0″ encoding=”UTF-8″?><data>logout</data>
  • Failed: if an error is found, Genelet returns you:
    <?xml version=”1.0″ encoding=”UTF-8″?><data>failed</data>

Finally, Case=2 is for XML.