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

Update for ASP.NET Core 3.x #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update for ASP.NET Core 3.x #26

wants to merge 2 commits into from

Conversation

ugumba
Copy link

@ugumba ugumba commented Jan 20, 2020

Got something working for ASP.NET Core 3.x (see #25).
I don't like the redirect. The browser's address bar shows the "internal" route, which is different from the original.
Can anyone suggest a better way to accomplish this?

Packaging and docs have not been updated yet.

@kingrichard2005
Copy link

kingrichard2005 commented Jul 23, 2021

See previous issue comment for details but consider removing references to HttpMethodActionConstraint since it's no longer publicly accessible in net 3+. Can replace with the following to get the same httpmethod metadata from the public EndpointMetadata property instead


	var httpMethodMetadata = _e.EndpointMetadata.Where(obj => obj is HttpMethodMetadata).FirstOrDefault();

	if (httpMethodMetadata != null)
	{
		var verbMethod = (httpMethodMetadata as HttpMethodMetadata).HttpMethods.FirstOrDefault();
		verb = verbMethod == null ? verb : verbMethod;
	}

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.

2 participants