Skip to content

Improve HTTP client usage #2388

@bbockelm

Description

@bbockelm

For what I'm sure are quite good HTTP-level reasons, if the HTTP response body is not fully read and closed then the TCP connection cannot be reused.

We don't do this consistently throughout the code base.

Additionally, we have the following pattern in the code:

  • Grab common transport from config module.
  • Create plain client from transport.

We should centralize client creation in config to reduce (or, at least, be able to monitor for) the variations in use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclientIssue affecting the OSDF clientstale

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions