Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add acceptable guard #2265

Merged
merged 3 commits into from
Nov 25, 2022
Merged

add acceptable guard #2265

merged 3 commits into from
Nov 25, 2022

Conversation

robjtede
Copy link
Member

@robjtede robjtede commented Jun 17, 2021

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

Acceptable guard type that matches if a matching mime type is found in the Accept header.

Result of a discussion on Discord.

@robjtede robjtede added B-semver-minor A-web project: actix-web labels Jun 17, 2021
@robjtede robjtede marked this pull request as draft June 17, 2021 15:02
@robjtede robjtede added this to the actix-web post-v4 milestone Jun 17, 2021
@arniu
Copy link
Contributor

arniu commented Jun 29, 2021

Why not name it Accept?

@robjtede
Copy link
Member Author

robjtede commented Jan 5, 2022

A preview of this is in actix-web-lab: https://docs.rs/actix-web-lab/0.2.0/actix_web_lab/guard/struct.Acceptable.html

@robjtede
Copy link
Member Author

robjtede commented Jan 5, 2022

Why not name it Accept?

@arniu Wanted to avoid conflict with the Accept typed header but not stuck to the decision.

@robjtede robjtede removed this from the actix-web post-v4 milestone Mar 1, 2022
@robjtede robjtede added this to the actix-web v4.3 milestone Sep 26, 2022
@robjtede robjtede marked this pull request as ready for review November 25, 2022 17:12
@robjtede robjtede requested a review from a team November 25, 2022 18:10
@robjtede robjtede merged commit d708a4d into master Nov 25, 2022
@robjtede robjtede deleted the acceptable-guard branch November 25, 2022 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-web project: actix-web B-semver-minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants