Skip to content

Outbound Feeds Development - Output Types

Fusion comes with a default outputType of html. If you need a response in another type, like xml, then the repository must provide that outputType either via a block or code in the components/output-types directory. Your outboundfeeds environment contains three outputTypes

  • json
  • text
  • xml

json and text output types

The json and text outputTypes are provided as blocks:

"@wpmedia/json-output-block",
"@wpmedia/text-output-block",

XML output type

The xml output-type is not a block, but an npm package. You must list it as a dependency in your package.json file:

"dependencies": {
"@wpmedia/feeds-xml-output": "^0.2.2"
},

To use this module, you must create a components/output-types/xml.js file that contains the following:

import { XmlOutput } from '@wpmedia/feeds-xml-output'
export default XmlOutput

After this configuration, all requests to fusion with the parameter ?outputType=xml will use this output-type to generate content.