I am working on an ASP.Net Web API 2 RESTful web service for importing and exporting data from my database. For my export method, the client has several options for exporting data in different formats (e.g. pdf, xml, etc.). I am trying to determine the best design for my interface for the client to inform the service which format to provide the data in.
As far as I can tell, my 2 best options are to use the Accept Header with media type strings or adding a parameter to the method where the client can provide the format parameter in the query string. If I choose to use the Accept Header this may involve using custom media type strings.
It seems to me that using the Accept Header would be more inline with HTTP standards and RESTful practices, but using the format parameter in the query string would be easier to implement on the service side and for the client.
Can anyone explain what some of the advantages or disadvantages of these 2 designs are?