Stop some curl whining (#6385)

GET is inferred, so make curl whine less by not printing it
This commit is contained in:
Jeff Mitchell
2019-03-08 14:14:50 -05:00
committed by GitHub
parent 43b28b075b
commit 528604359c

View File

@@ -41,7 +41,9 @@ func (d *OutputStringError) parseRequest() {
// Build cURL string
d.parsedCurlString = "curl "
d.parsedCurlString = fmt.Sprintf("%s-X %s ", d.parsedCurlString, d.Request.Method)
if d.Request.Method != "GET" {
d.parsedCurlString = fmt.Sprintf("%s-X %s ", d.parsedCurlString, d.Request.Method)
}
for k, v := range d.Request.Header {
for _, h := range v {
if strings.ToLower(k) == "x-vault-token" {