format. If you wanted to request the XML version of an action, for example, your URL call would look something like this:
paramsstruct set to the
formatrequested. With the XML example, there will be a variable at
params.formatwith a value of
<cfhttp>call would look something like this:
Acceptheader with the value for the
config(), you are instructing the CFWheels controller to be ready to provide content in a number of formats. Possible choices to add to the list are
html(which runs by default),
Content-TypeHTTP header as well.
firstNamewill always be treated as a string (i.e. wrap in double quotes) and
booksForSaleas an integer (i.e. no decimal places) when producing the JSON output. Without this, your CFML engine might guess what the data type is, and it wouldn't always be correct unfortunately.
json, or if you need to customize what your CFWheels application generates, you have that option.
views, all you need to do is implement a view file like so:
views/products/index.pdf.cfmmay look something like this: