Changes between Version 19 and Version 20 of S3XRC/ResourceReport
- Timestamp:
- 08/28/10 19:48:17 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3XRC/ResourceReport
v19 v20 55 55 ==== Provide different report formats ==== 56 56 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.57 In 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. 58 58 59 59 To know which format has been specified, simply use r.representation inside the method handler: … … 103 103 }}} 104 104 105 It 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. 105 106 ==== Get at the data ==== 106 107