Skip to content

Commit

Permalink
fix: recover version test before gen api client
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZexiao committed Dec 29, 2022
1 parent 41b90c0 commit d050820
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ func New(url string) (*Client, error) {
SetHostURL(url).
SetHeader("Accept", "application/json")

// _, err := client.R().Get("/version")
// if err != nil {
// return nil, fmt.Errorf("failed to connect to %s: %w", url, err)
// }
_, err := client.R().Get("/version")
if err != nil {
return nil, fmt.Errorf("failed to connect to %s: %w", url, err)
}

client.SetAllowGetMethodPayload(true)

Expand Down

0 comments on commit d050820

Please sign in to comment.