Changes between Version 19 and Version 20 of S3XRC/ResourceReport


Ignore:
Timestamp:
08/28/10 19:48:17 (11 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3XRC/ResourceReport

    v19 v20  
    5555==== Provide different report formats ====
    5656
    57 You want to provide the report in various formats, hence you need to know what format the user has requested. The best way is to check for the format that has been specified in the URL.
     57In a later improvement, you want to provide the report in various formats, hence you need to know what format the user has requested. The best way is to check for the format that has been specified in the URL.
    5858
    5959To know which format has been specified, simply use r.representation inside the method handler:
     
    103103}}}
    104104
     105It is important to raise a HTTP error in case of an unsupported format rather than providing a nicely formatted error message to the user: while an interactive user who just clicks on links and buttons would rarely request something else than HTML - it would rather be a non-interactive client which requests other formats, and that would hardly understand a nicely formatted error message but expects a proper HTTP status in the response header.
    105106==== Get at the data ====
    106107