Skip to content

feat(client): support static request headers and expand examples#14

Merged
rschmied merged 6 commits into
mainfrom
dev
Mar 31, 2026
Merged

feat(client): support static request headers and expand examples#14
rschmied merged 6 commits into
mainfrom
dev

Conversation

@rschmied

Copy link
Copy Markdown
Owner

Summary

  • add generic support for static outbound request headers in the client
  • ensure configured headers are applied to auth bootstrap and regular API calls
  • add runnable examples and package examples for common client usage patterns
  • document proxy-header usage in the README and improve related test coverage

- introduce examples for auth-token, auth-userpass, labs-list,
  errors-is, annotations-line-null in `examples/`
- implement example tests in `example_test.go` and
  `pkg/client/example_test.go`
- re-export `client.Option` and common option funcs/vars in
  `gocmlclient.go`
- update `README.md` with example pointers and UUID usage
- minor formatting adjustments and alias imports in `cmd/dtest/main.go`
- WithRequestHeader() and WithRequestHeaders()
- currently only tests exist
- Introduced WithRequestHeader and WithRequestHeaders options for client configuration
- Enabled passing static headers (e.g., proxy tokens) on all outbound HTTP requests
- Added example for proxy authorization header to README and new sample main.go
- Implemented header injection via NewHeaderTransport in internal/httputil
- Included header validation and related unit tests
- Integrated header injection into API client initialization
- Updated documentation with usage and detailed explanations
@coveralls

coveralls commented Mar 31, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 92.954% (+0.07%) from 92.88%
when pulling 9805222 on dev
into 8c2d257 on main.

@rschmied rschmied merged commit 3a07556 into main Mar 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants