npm got

Solutions on MaxInterview for npm got by the best coders in the world

showing results for - "npm got"
Felix
30 Jun 2018
1const got = require('got');
2
3(async () => {
4	try {
5		const response = await got('https://sindresorhus.com');
6		console.log(response.body);
7		//=> '<!doctype html> ...'
8	} catch (error) {
9		console.log(error.response.body);
10		//=> 'Internal server error ...'
11	}
12})();