Skip to content

Commit 74a3df2

Browse files
committed
doc: clarify use of .xml or .json extensions in REST interface
Document that /rest and /rest/data do not support extensions.
1 parent 81d6117 commit 74a3df2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/rest.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,15 +336,17 @@ way to specify alternate acceptable response formats.
336336
To make testing from the browser easier, you can also append the
337337
extension ``.json`` or ``.xml`` to the path component of the url. This
338338
will force json or xml (if supported) output. If you use an extension
339-
it takes priority over any accept headers.
339+
it takes priority over any accept headers. Note the extension does not
340+
work for the ``/rest`` or ``/rest/data`` paths. In these cases it
341+
returs a 404 error. Adding the header ``Accept: application/xml``
342+
allows these paths to return xml data.
340343

341344
The rest interface returns status 406 if you use an unrecognized
342345
extension. You will also get a 406 status if none of the entries in
343346
the accept header are available or if the accept header is invalid.
344347

345348
Note: ``dicttoxml2.py`` is an updated version of ``dicttoxml.py``. If
346-
you are still using Python 2.7 or 3.6, you should use
347-
``dicttoxml.py``.
349+
you are still using Python 2.7 or 3.6, you can use ``dicttoxml.py``.
348350

349351

350352
General Guidelines

0 commit comments

Comments
 (0)