allow stdout pipe
parent
6e8f3feee9
commit
520fca8ee5
6
main.go
6
main.go
|
|
@ -6,6 +6,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"gitlab-app.eng.qops.net/golang/jwt"
|
"gitlab-app.eng.qops.net/golang/jwt"
|
||||||
|
|
@ -44,7 +45,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if verbose {
|
if verbose {
|
||||||
fmt.Println(req)
|
fmt.Fprintf(os.Stderr, "%v\n", req)
|
||||||
}
|
}
|
||||||
resp, err := c.Do(req)
|
resp, err := c.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -56,7 +57,8 @@ func main() {
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
fmt.Printf("(%d) %s\n", resp.StatusCode, bytes.TrimSpace(b))
|
fmt.Fprintf(os.Stderr, "(%d) ", resp.StatusCode)
|
||||||
|
fmt.Printf("%s\n", bytes.TrimSpace(b))
|
||||||
}
|
}
|
||||||
|
|
||||||
func setJWT(r *http.Request, brandID string) {
|
func setJWT(r *http.Request, brandID string) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue