@jswork/next-content-type

Get correct content type for next.

Usage no npm install needed!

<script type="module">
  import jsworkNextContentType from 'https://cdn.skypack.dev/@jswork/next-content-type';
</script>

README

next-content-type

Get correct content type for next.

version license size download

installation

npm install -S @jswork/next-content-type

usage

import '@jswork/next-content-type';

nx.contentType('urlencoded'); 
// application/x-www-form-urlencoded

nx.contentType('multipart'); 
// multipart/form-data

nx.contentType('json'); 
// application/json;charset=utf-8

nx.contentType('raw'); 
// text/plain

license

Code released under the MIT license.