From 8abebe87564d40f65b3e5f551031cad94d7a238e Mon Sep 17 00:00:00 2001 From: Jacob Date: Mon, 25 Feb 2019 10:27:59 -0800 Subject: [PATCH] Adds support for special __path parameter --- lib.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib.js b/lib.js index c883b93..791e8a1 100644 --- a/lib.js +++ b/lib.js @@ -178,6 +178,13 @@ var lib = (function (window) { } pathname = pathname + '/'; + if (params.__path) { + pathname = pathname + params.__path; + if (!pathname.endsWith('/')) { + pathname = pathname + '/'; + } + delete params.__path; + } var headers = {}; var body;