• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 'use strict';
2 
3 require('../common');
4 
5 const assert = require('assert');
6 const http = require('http');
7 
8 {
9 
10   const options = {
11     port: '80',
12     path: '/',
13     headers: {
14       host: []
15     }
16   };
17 
18   assert.throws(() => {
19     http.request(options);
20   }, {
21     code: /ERR_INVALID_ARG_TYPE/
22   }, 'http request should throw when passing array as header host');
23 }
24