Search code examples
csvmime-typesrfc4180

Proper syntax for optional header parameter for text/csv mimetype?


According to RFC 4180:

...the presence or absence of the header line should be indicated via the optional "header" parameter of this MIME type...

So, does that mean the correct string is:

text/csv; header

Or perhaps:

text/csv; header=true

Or something else?


Solution

  • The "header" parameter indicates the presence or absence of the header line. Valid values are "present" or "absent".

    So if you use that parameter, the full MIME type would be text/csv; header=present or text/csv; header=absent.