Skip to content

[Step 1] Core: Introduce HTTPX URL Builder Utility #929

@fderuiter

Description

@fderuiter

Context

We need a centralized utility to dynamically sanitize and join paths without aggressive encoding.


🗺️ Execution Plan

  • Open src/imednet/utils/url.py.
  • Create a new function build_safe_path(base_path: str, *segments: Any) -> str.
  • Implement logic using httpx.URL("http://dummy").join(...) to normalize the joined path segments natively.

✅ Definition of Done (Acceptance Criteria)

  • build_safe_path function exists in src/imednet/utils/url.py.
  • Function accepts a base path and any number of segment arguments.
  • Function strips double slashes and outputs an unquoted, normalized relative path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions