Skip to content

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

@cloudfly

Description

@cloudfly

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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions