Page 105 - Nodejs 교과서 개정2판
P. 105

§ Ӓܿ     8)"58(৬ ֢٘੄ ઱ࣗ ୓҅


          url.js

           ➊
           const	url	=	require('url');
            
           const	{	URL	}	=	url;
           const	myURL	=	new	URL('http://www.gilbut.co.kr/book/bookList.aspx?sercate1=001001000#anchor');
           console.log('new	URL():',	myURL);
           console.log('url.format():',	url.format(myURL));
           console.log('------------------------------');
           const	parsedUrl	=	url.parse('http://www.gilbut.co.kr/book/bookList.aspx?sercate1=001001000#anchor');
           console.log('url.parse():',	parsedUrl);
           console.log('url.format():',	url.format(parsedUrl));




            ➊ VSM ݽٕ উী 63- ࢤࢿ੗о ੓णפ׮  ੉ ࢤࢿ੗ী ઱ࣗܳ ֍য ё୓۽ ٜ݅ݶ ઱ࣗо ࠗ࠙߹۽ ੿ܻؾפ
              ׮  ੉ ߑध੉ 8)"58(੄ VSMੑפ׮  8)"58(ী݅ ੓ח username  password  origin  searchParams

              ࣘࢿ੉ ઓ੤೤פ׮

          
          콘솔

           $	node	url
           new	URL():	URL	{
           		href:	'http://www.gilbut.co.kr/book/bookList.aspx?sercate1=001001000#anchor',
   100   101   102   103   104   105   106   107   108   109   110