We are developing a REST API that can return a zip file. The content of the zip file can be in CSV or EXCEL format. How should the Accept header describe the two scenarios?
Accept=application/zip;format=csv
Accept=application/zip;format=excel
Is the example above valid?
According to RFC7231 "Media ranges can be overridden by more specific media ranges or specific media types. If more than one media range applies to a given type, the most specific reference has precedence." https://www.rfc-editor.org/rfc/rfc7231#section-5.3.2