consthandler={scheme:"http",domainHost:true,parse:function(components,options){//report missing hostif(!components.host){components.error=components.error||"HTTP URIs must have a host.";}returncomponents;},serialize:function(components,options){constsecure=String(components.scheme).toLowerCase()==="https";//normalize the default portif(components.port===(secure?443:80)||components.port===""){components.port=undefined;}//normalize the empty pathif(!components.path){components.path="/";}//NOTE: We do not parse query strings for HTTP URIs//as WWW Form Url Encoded query strings are part of the HTML4+ spec,//and not the HTTP spec.returncomponents;}};exportdefaulthandler;//# sourceMappingURL=http.js.map