We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26e9361 commit d417a55Copy full SHA for d417a55
jb-postman.groovy
@@ -32,7 +32,13 @@ iff.eachLine {
32
if (rawUrl.contains("://")) {
33
def extUrl = rawUrl.split("://")
34
url.put("protocol", extUrl[0])
35
- url.put("host", extUrl[1].split("/")?[0]?.split("\\."))
+ def cleanUrl = extUrl[1].split("\\?")[0] // remove query part
36
+ if (cleanUrl.contains("/")){ // if has path part
37
+ url.put("host", cleanUrl.split("/")?[0]?.split("\\."))
38
+ url.put("path", cleanUrl.split("/")?[1..-1])
39
+ } else {
40
+ url.put("host", cleanUrl.split("\\."))
41
+ }
42
} else {
43
url.put("host",rawUrl.split("/")?[0]?.split("\\."))
44
0 commit comments