RESTful URI and accessing PDF files, etc
Posted: Mon Jan 04, 2010 9:32 am
I am reading up on REST again, according to the Wiki:
I am curious though, what might the URI look like, as fetching reports is just retreiving, no deleting, editing, etc of the PDF output:
One of the ideas (as I understand) of REST is to clean up the URI namespace but the abve looks nasty, however its not possible to POST data to a report generator when in reality is want GET to be used anyway. I am not certain parameters would be required as I think everything the report builder would need would be available through the ID of the report being generated.
Cheers,
Alex
So requesting a RESTful resource it can return any document of any type, whether that JSON, XML, or PDF, etc. I guess you just have to remember to set the proper mime-type.The application does, however, need to understand the format of the information (representation) returned, which is typically an HTML, XML or JSON document of some kind, although it may be an image, plain text, or any other content.
I am curious though, what might the URI look like, as fetching reports is just retreiving, no deleting, editing, etc of the PDF output:
Code: Select all
domain.com/reports/2/other/params
domain.com/users/reports/2/other/paramsCheers,
Alex