MCPcopy Create free account
hub / github.com/RubaXa/Pilot / Request

Function Request

Pilot.js:957–982  ·  view source on GitHub ↗
(url, referrer, router)

Source from the content-addressed store, hash-verified

955 * @param {Pilot} [router]
956 */
957 var Request = function (url, referrer, router) {
958 url = new URL(url);
959
960 this.href = url.href;
961 this.protocol = url.protocol;
962 this.host = url.host;
963 this.hostname = url.hostname;
964 this.port = url.port;
965
966 this.path =
967 this.pathname = url.pathname;
968
969 this.search = url.search;
970 this.query = queryString.parse(url.search);
971 this.params = {};
972
973 this.hash = url.hash;
974
975 this.route = router && (router.route || router.activeRoute) || {};
976 this.router = router;
977 this.referrer = referrer;
978 this.redirectHref = null;
979
980 // Алиас, который сматчился
981 this.alias = void 0;
982 };
983
984
985 Request.prototype = /** @lends Request# */{

Callers

nothing calls this directly

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected