Skip to content

Request context question #4127

@stevehipwell

Description

@stevehipwell

The current implementation of the client has the NewRequest method which uses http.NewRequest and then we use withContext which just wraps req.WithContext to copy the context. Is there a compelling reason why this pattern is used instead of using http.NewRequestWithContext which would save having to copy every request just to set the context which is known when the request is created?

Metadata

Metadata

Assignees

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