Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add context.Context parameter for Client.NewRequest interface #4

Open
cloudfly opened this issue Apr 27, 2023 · 1 comment
Open

Add context.Context parameter for Client.NewRequest interface #4

cloudfly opened this issue Apr 27, 2023 · 1 comment

Comments

@cloudfly
Copy link

Proposal
add a context.Context parameter for method NewRequest in interface Client


current:

NewRequest(method, url string) *resty.Request

proposal:

NewRequest(ctx context.Context, method, url string) *resty.Request

So that, we can initialize the testy.Request with some information from the Context, such as injecting trace ID and JWT token in http header .

@alexmt
Copy link
Contributor

alexmt commented May 24, 2023

thanks for proposal @cloudfly . It makes sense to me. WDYT, @devholic ?

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

No branches or pull requests

2 participants