Skip to content

Commit

Permalink
Add spacelift client type request header (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
michieldewilde authored May 6, 2024
1 parent f163764 commit 8241b96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ func (c *client) apiClient(ctx context.Context) (*graphql.Client, error) {
return nil, fmt.Errorf("graphql client creation failed at http client creation: %w", err)
}

return graphql.NewClient(c.session.Endpoint(), httpC), nil
requestOptions := []graphql.RequestOption{
graphql.WithHeader("Spacelift-Client-Type", "spacectl"),
}

return graphql.NewClient(c.session.Endpoint(), httpC, requestOptions...), nil
}

func (c *client) Do(req *http.Request) (*http.Response, error) {
Expand Down

0 comments on commit 8241b96

Please sign in to comment.