Can Azure Functions return XML? -


looking node.js example of returning xml azure function. code have below returns string of xml, response content-type set text/plain; charset=utf-8 instead of text/xml; charset=utf-8

index.js

module.exports = function(context, req) {     var xml = '<?xml version="1.0" encoding="utf-8"?><response><say>azure functions!</say></response>';      context.res = {         contenttype: 'text/xml',         body: xml     };      context.done(); }; 

here bindings.

function.json

{   "bindings": [     {       "authlevel": "function",       "type": "httptrigger",       "direction": "in",       "name": "req"     },     {       "type": "http",       "direction": "out",       "name": "res"     }   ],   "disabled": false } 

mark,

absolutely! close, can see example of how can set content type on response here.

there's fix next release enable proper content negotiation, eliminate need explicitly set content in many cases.


Comments