Skip to content

Conversation

Herddex
Copy link

@Herddex Herddex commented Jun 23, 2024

PR Type

Feature

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

Added a new public method HttpRequest::url_for_map(), an alternative to HttpRequest::url_for().

Differences from HttpRequest::url_for():

  • Accepts a std::HashMap of elements by parameter names instead of an iterator over elements.
  • Delegates to ResourceDef::resource_path_from_map() instead of ResourceDef::resource_path_from_iter()

The common code between the two methods was refactored to avoid repetition.

Closes #628

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for passing in named parameters in url_for.
1 participant