Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

NodeJS Content-Type

res.type('.html')            // => 'text/html'
res.type('html')             // => 'text/html'
res.type('json')             // => 'application/json'
res.type('application/json') // => 'application/json'
res.type('png')              // => 'image/png'
res.type('mp3')              // => 'audio/mp3'
Comment

NodeJS Content-Type

res.type('txt');
res.send(JSON.stringify({...}));
Comment

PREVIOUS NEXT
Code Example
Javascript :: vue multiple slot 
Javascript :: javascript set() method 
Javascript :: jquery change label content 
Javascript :: how to async javascript stack overflow 
Javascript :: vue3 header 
Javascript :: javascript infinite while loop 
Javascript :: rxjs takeuntil 
Javascript :: stringy 
Javascript :: knex pagination plugin 
Javascript :: iterating over a string 
Javascript :: is date 1 day ago javascript 
Javascript :: emailjs react 
Javascript :: Declare and Initialize Arrays in javascript 
Javascript :: run function after another function javascript 
Javascript :: email validation in javascript 
Javascript :: deploying multiple sites in firebase 
Javascript :: promise definition in javascript 
Javascript :: Recursion In DOM 
Javascript :: why node_modules are not installed anymore 
Javascript :: Remove all falsy values from an array 
Javascript :: binary search tree js 
Javascript :: send json in javascript 
Javascript :: javascript create array 
Javascript :: material ui phone number input 
Javascript :: convert string to array js 
Javascript :: JS how to access a class propert 
Javascript :: send json by curl 
Javascript :: js quote 
Javascript :: get jsonp with fetch 
Javascript :: err handling express 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =