tiny_request icon indicating copy to clipboard operation
tiny_request copied to clipboard

Node API style err param

Open ya-kostik opened this issue 8 years ago • 0 comments

Why don't you use the accepted in node style for callback functions? When err comes first parameter.

req.get('http://google.com', (err, body, response) => {
  if (err) return console.error(err);
  if (response.statusCode === 200) {  
    console.log(body) 
  } 
});

ya-kostik avatar Jul 29 '16 10:07 ya-kostik