Skip to content

Use URL Crate on Client Side #334

@gierens

Description

@gierens

Problem

In the lib crate there is quite a lot of URL handled by Strings which may not be ideal. In particular you find a magnitude of the TODO use Url.join comments in various modules where I just used format! to concat.

Solution

I would be much cleaner, if the various client-side Api structs, e.g. UserApi, would have their url fields be of Url type, and then use Url.join to concatenate the base URL and the endpoint path together. The cli crate should probably also directly parse the -u/--url into a Url rather than a String.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions