Skip to content

Commit

Permalink
Stop some curl whining (#6385)
Browse files Browse the repository at this point in the history
GET is inferred, so make curl whine less by not printing it
  • Loading branch information
jefferai authored Mar 8, 2019
1 parent 43b28b0 commit 5286043
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/output_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit 5286043

Please sign in to comment.