Skip to content

Commit 92b446e

Browse files
committed
fix HTTP verb extraction
1 parent d417a55 commit 92b446e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jb-postman.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ iff.eachLine {
2626
case l.startsWith("# "): break
2727
case {l ==~ "(GET|PUT|POST|DELETE|OPTIONS).+"}:
2828
item.put("name", "request-${++count}")
29-
req.put("method", l[0..3])
29+
req.put("method", l.split(" ")[0].trim())
3030
def rawUrl = l.split(" ")[1]
3131
url.put("raw", rawUrl)
3232
if (rawUrl.contains("://")) {

0 commit comments

Comments
 (0)