Skip to content

Commit 7ff63b0

Browse files
committed
curl/parse: support -b for specifying cookies
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
1 parent 4da6a6f commit 7ff63b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

curl/parse.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ func Parse(curl string) (*Parsed, error) {
7373
case "-X":
7474
i++
7575
req.Method = parts[i]
76+
case "-b":
77+
i++
78+
req.Header.Add("Cookie", parts[i])
7679
}
7780
}
7881
req.Body = io.NopCloser(strings.NewReader(body))

0 commit comments

Comments
 (0)